From 980fc6a34adb9e4ec7e87948a7c29127a387090c Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 10 Sep 2024 02:13:05 +0300 Subject: [PATCH] [develop | DONE | FIXED]: userMini.component.ts Added a class field isClient: boolean = false; and set it in constructor with "this.isClient = !isPlatformServer(this.platform);" statement & added checks not to display dropdowns on server (needed also for non destructive hydration). --- login/userMini.component.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/login/userMini.component.ts b/login/userMini.component.ts index 87029003..08d20edc 100644 --- a/login/userMini.component.ts +++ b/login/userMini.component.ts @@ -1,4 +1,14 @@ -import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core'; +import { + Component, + EventEmitter, + Inject, + Input, + OnChanges, + OnInit, + Output, PLATFORM_ID, + SimpleChanges, + ViewChild +} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Session, User} from './utils/helper.class'; import {RouterHelper} from '../utils/routerHelper.class'; @@ -9,6 +19,7 @@ import { NotificationConfiguration, NotificationsSidebarComponent } from "../notifications/notifications-sidebar/notifications-sidebar.component"; +import {isPlatformServer} from "@angular/common"; declare var UIkit; @@ -27,7 +38,7 @@ declare var UIkit; -
+