Fehler Hamburger Menu, Backend requests

This commit is contained in:
2025-12-08 00:55:01 +01:00
parent 30ecc292cd
commit 0ac17ef155
9 changed files with 87 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
<nav class="bg-white border-neutral-200 dark:bg-neutral-900 print:hidden">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<a routerLink="/home" class="flex items-center space-x-3 rtl:space-x-reverse">
<img src="assets/images/header-logo.png" class="h-10" alt="BizMatch - Business Marketplace for Buying and Selling Businesses" width="150" height="40" />
<img src="assets/images/header-logo.png" class="h-10 w-auto" alt="BizMatch - Business Marketplace for Buying and Selling Businesses" />
</a>
<div class="flex items-center md:order-2 space-x-3 rtl:space-x-reverse">
<!-- Filter button -->

View File

@@ -1,10 +1,10 @@
import { CommonModule } from '@angular/common';
import { Component, HostListener, OnDestroy, OnInit } from '@angular/core';
import { Component, HostListener, OnDestroy, OnInit, AfterViewInit } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NavigationEnd, Router, RouterModule } from '@angular/router';
import { faUserGear } from '@fortawesome/free-solid-svg-icons';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Collapse, Dropdown } from 'flowbite';
import { Collapse, Dropdown, initFlowbite } from 'flowbite';
import { filter, Observable, Subject, takeUntil } from 'rxjs';
import { SortByOptions, User } from '../../../../../bizmatch-server/src/models/db.model';
@@ -29,7 +29,7 @@ import { ModalService } from '../search-modal/modal.service';
templateUrl: './header.component.html',
styleUrl: './header.component.scss',
})
export class HeaderComponent implements OnInit, OnDestroy {
export class HeaderComponent implements OnInit, OnDestroy, AfterViewInit {
public buildVersion = environment.buildVersion;
user$: Observable<KeycloakUser>;
keycloakUser: KeycloakUser;
@@ -285,6 +285,14 @@ export class HeaderComponent implements OnInit, OnDestroy {
};
}
ngAfterViewInit(): void {
// Initialize Flowbite after header DOM is fully rendered
// This ensures all dropdown elements exist before initialization
setTimeout(() => {
initFlowbite();
}, 0);
}
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();