authheader-fix
This commit is contained in:
parent
cbb66c5452
commit
f693cdefeb
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -11,6 +11,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@authorizerdev/authorizer-js": "1.2.11",
|
"@authorizerdev/authorizer-js": "1.2.11",
|
||||||
|
"ackee-tracker": "5.1.0",
|
||||||
"form-data": "4.0.0",
|
"form-data": "4.0.0",
|
||||||
"i18next": "22.4.15",
|
"i18next": "22.4.15",
|
||||||
"i18next-icu": "2.3.0",
|
"i18next-icu": "2.3.0",
|
||||||
|
@ -6378,6 +6379,14 @@
|
||||||
"tslib": "^2.3.1"
|
"tslib": "^2.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ackee-tracker": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ackee-tracker/-/ackee-tracker-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-A7iKkGyUnEXuOzxultQB7hnm4bStYCo1c38MYRRihBfqUP8AImhtZOODb00t9xrXs/BTsg06bz1MKpXeMs9sYw==",
|
||||||
|
"dependencies": {
|
||||||
|
"platform": "^1.3.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/acorn": {
|
"node_modules/acorn": {
|
||||||
"version": "8.11.3",
|
"version": "8.11.3",
|
||||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
|
||||||
|
@ -15944,6 +15953,11 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/platform": {
|
||||||
|
"version": "1.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
|
||||||
|
"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg=="
|
||||||
|
},
|
||||||
"node_modules/pluralize": {
|
"node_modules/pluralize": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz",
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@authorizerdev/authorizer-js": "1.2.11",
|
"@authorizerdev/authorizer-js": "1.2.11",
|
||||||
|
"ackee-tracker": "5.1.0",
|
||||||
"form-data": "4.0.0",
|
"form-data": "4.0.0",
|
||||||
"i18next": "22.4.15",
|
"i18next": "22.4.15",
|
||||||
"i18next-icu": "2.3.0",
|
"i18next-icu": "2.3.0",
|
||||||
|
|
|
@ -32,7 +32,7 @@ const MD_WIDTH_BREAKPOINT = 992
|
||||||
export const HeaderAuth = (props: Props) => {
|
export const HeaderAuth = (props: Props) => {
|
||||||
const { t } = useLocalize()
|
const { t } = useLocalize()
|
||||||
const { page } = useRouter()
|
const { page } = useRouter()
|
||||||
const { session, author, isAuthenticated } = useSession()
|
const { session, author, isAuthenticated, isSessionLoaded } = useSession()
|
||||||
const {
|
const {
|
||||||
unreadNotificationsCount,
|
unreadNotificationsCount,
|
||||||
actions: { showNotificationsPanel },
|
actions: { showNotificationsPanel },
|
||||||
|
@ -58,7 +58,9 @@ export const HeaderAuth = (props: Props) => {
|
||||||
const isNotificationsVisible = createMemo(() => isAuthenticated() && !isEditorPage())
|
const isNotificationsVisible = createMemo(() => isAuthenticated() && !isEditorPage())
|
||||||
const isSaveButtonVisible = createMemo(() => isAuthenticated() && isEditorPage())
|
const isSaveButtonVisible = createMemo(() => isAuthenticated() && isEditorPage())
|
||||||
const isCreatePostButtonVisible = createMemo(() => isAuthenticated() && !isEditorPage())
|
const isCreatePostButtonVisible = createMemo(() => isAuthenticated() && !isEditorPage())
|
||||||
const isAuthenticatedControlsVisible = createMemo(() => isAuthenticated())
|
const isAuthenticatedControlsVisible = createMemo(
|
||||||
|
() => isAuthenticated() && session()?.user?.email_verified,
|
||||||
|
)
|
||||||
|
|
||||||
const handleBurgerButtonClick = () => {
|
const handleBurgerButtonClick = () => {
|
||||||
toggleEditorPanel()
|
toggleEditorPanel()
|
||||||
|
@ -111,7 +113,7 @@ export const HeaderAuth = (props: Props) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ShowOnlyOnClient>
|
<ShowOnlyOnClient>
|
||||||
<Show when={session()?.user?.email_verified} keyed={true}>
|
<Show when={isSessionLoaded()} keyed={true}>
|
||||||
<div class={clsx('col-auto col-lg-7', styles.usernav)}>
|
<div class={clsx('col-auto col-lg-7', styles.usernav)}>
|
||||||
<div class={styles.userControl}>
|
<div class={styles.userControl}>
|
||||||
<Show when={isCreatePostButtonVisible()}>
|
<Show when={isCreatePostButtonVisible()}>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user