Skip to content

Commit f4c1e62

Browse files
PSK logout & reset
1 parent b405790 commit f4c1e62

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/app/clientApp/Devices/hooks.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ export function useAppInitialization(settings: {
258258
const [initializationLoading, setInitializationLoading] = useState(false)
259259
const [initialize, setInitialize] = useState(wellKnownConfig.isInitialized)
260260

261+
useEffect(() => {
262+
if (wellKnownConfig.isInitialized !== initialize) {
263+
setInitialize(wellKnownConfig.isInitialized)
264+
}
265+
}, [wellKnownConfig.isInitialized])
266+
261267
useEffect(() => {
262268
if (wellKnownConfig && !wellKnownConfig.isInitialized && clientData && !initializationLoading && !loading) {
263269
if (clientData?.authenticationMode === DEVICE_AUTH_MODE.X509) {

src/components/Atomic/TagGroup/TagGroup.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@ const TagGroup: FC<Props> = (props) => {
5858
)
5959

6060
const calculate = useCallback(() => {
61-
const parentWidth = parent.current?.clientWidth ?? 0
61+
const parentWidth = parent?.current?.clientWidth ?? 0
6262
let totalChildWidth = 2
6363
const childArray: number[] = []
6464

6565
tags.current.forEach((tag: any, key: number) => {
66-
totalChildWidth += tag.clientWidth
66+
totalChildWidth += tag?.clientWidth
6767
if (key !== 0) {
6868
totalChildWidth += 4
6969
}
70-
childArray.push(tag.clientWidth + 4)
70+
childArray.push(tag?.clientWidth + 4)
7171
})
7272

7373
if (totalChildWidth > parentWidth) {
74-
let currentWidth = moreTags.current?.clientWidth ?? 0
74+
let currentWidth = moreTags?.current?.clientWidth ?? 0
7575
let numbersToRender = 0
7676
let findingIsOver = false
7777

@@ -118,7 +118,7 @@ const TagGroup: FC<Props> = (props) => {
118118
</div>
119119
</div>
120120

121-
{tagsToDisplay && <Inner />}
121+
{tagsToDisplay > 0 && <Inner />}
122122

123123
<Modal
124124
appRoot={document.getElementById('root')}

0 commit comments

Comments
 (0)