Remove sidebar pill timestamp effect
Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
3abec1aee7
commit
f9f8ecfd38
1 file changed
+2
-9
@@ -42,15 +42,8 @@ function useInitialProviderVisibleAfterIso(
|
||||
providers: ReadonlyArray<Pick<ServerProvider, "checkedAt">>,
|
||||
): string | undefined {
|
||||
const latestCheckedAt = latestProviderCheckedAt(providers);
|
||||
const [visibleAfterIso, setVisibleAfterIso] = useState<string | undefined>(() => latestCheckedAt);
|
||||
|
||||
useEffect(() => {
|
||||
if (visibleAfterIso === undefined && latestCheckedAt !== undefined) {
|
||||
setVisibleAfterIso(latestCheckedAt);
|
||||
}
|
||||
}, [latestCheckedAt, visibleAfterIso]);
|
||||
|
||||
return visibleAfterIso ?? latestCheckedAt;
|
||||
const [initialVisibleAfterIso] = useState<string | undefined>(() => latestCheckedAt);
|
||||
return initialVisibleAfterIso ?? latestCheckedAt;
|
||||
}
|
||||
|
||||
function useProviderUpdatePillTransition(view: ProviderUpdateSidebarPillView | null) {
|
||||
|
||||
Reference in new issue
Block a user