Better hooks use
This commit is contained in:
@ -9,7 +9,7 @@ import { ConfirmationModal } from '../patterns/ConfirmationModal'
|
||||
import { KeyboardShortcutListModal } from './KeyboardShortcutListModal'
|
||||
import { setupAnalytics } from '../../lib/analytics'
|
||||
import { primaryCommands } from '../../lib/keyboardShortcuts/navigationShortcuts'
|
||||
import { logout } from '../../lib/logout'
|
||||
import { logout, useLogout } from '../../lib/logout'
|
||||
import { useApplyLocalTheme } from '../../lib/hooks/useApplyLocalTheme'
|
||||
import { useRegisterActions } from 'kbar'
|
||||
import { theme } from '../tokens/stitches.config'
|
||||
@ -108,6 +108,7 @@ export function NavigationLayout(props: NavigationLayoutProps): JSX.Element {
|
||||
}
|
||||
}, [showLogout])
|
||||
|
||||
const { logout } = useLogout()
|
||||
// if (isLoading) {
|
||||
// return (
|
||||
// <HStack
|
||||
|
||||
@ -9,7 +9,7 @@ import { ConfirmationModal } from '../patterns/ConfirmationModal'
|
||||
import { KeyboardShortcutListModal } from './KeyboardShortcutListModal'
|
||||
import { setupAnalytics } from '../../lib/analytics'
|
||||
import { primaryCommands } from '../../lib/keyboardShortcuts/navigationShortcuts'
|
||||
import { logout } from '../../lib/logout'
|
||||
import { logout, useLogout } from '../../lib/logout'
|
||||
import { useApplyLocalTheme } from '../../lib/hooks/useApplyLocalTheme'
|
||||
import { updateTheme } from '../../lib/themeUpdater'
|
||||
import { Priority, useRegisterActions } from 'kbar'
|
||||
@ -96,6 +96,8 @@ export function PrimaryLayout(props: PrimaryLayoutProps): JSX.Element {
|
||||
}
|
||||
}, [showLogout])
|
||||
|
||||
const { logout } = useLogout()
|
||||
|
||||
return (
|
||||
<>
|
||||
{props.pageMetaDataProps ? (
|
||||
|
||||
@ -8,7 +8,7 @@ import { ConfirmationModal } from '../patterns/ConfirmationModal'
|
||||
import { KeyboardShortcutListModal } from './KeyboardShortcutListModal'
|
||||
import { PageMetaData } from '../patterns/PageMetaData'
|
||||
import { DEFAULT_HEADER_HEIGHT } from './homeFeed/HeaderSpacer'
|
||||
import { logout } from '../../lib/logout'
|
||||
import { logout, useLogout } from '../../lib/logout'
|
||||
import { SettingsMenu } from './navMenu/SettingsMenu'
|
||||
import { SettingsDropdown } from './navMenu/SettingsDropdown'
|
||||
import { useVerifyAuth } from '../../lib/hooks/useVerifyAuth'
|
||||
@ -75,6 +75,8 @@ export function SettingsLayout(props: SettingsLayoutProps): JSX.Element {
|
||||
}
|
||||
}, [showLogout])
|
||||
|
||||
const { logout } = useLogout()
|
||||
|
||||
return (
|
||||
<VStack
|
||||
alignment="start"
|
||||
|
||||
Reference in New Issue
Block a user