From 3f68737b2b2a982d93c668d6f90c9cab1a5e8c36 Mon Sep 17 00:00:00 2001 From: Vitor George Date: Mon, 18 Dec 2023 10:31:45 +0000 Subject: [PATCH] Fix auth messages in 'forbidden' and 'create atbd' pages --- app/assets/scripts/a11n/forbidden.js | 4 ++-- app/assets/scripts/components/new-atbd/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/scripts/a11n/forbidden.js b/app/assets/scripts/a11n/forbidden.js index aed58004..528b8cf5 100644 --- a/app/assets/scripts/a11n/forbidden.js +++ b/app/assets/scripts/a11n/forbidden.js @@ -15,7 +15,7 @@ import { Link } from '../styles/clean/link'; import { useUser } from '../context/user'; function Forbidden() { - const user = useUser(); + const { isLogged } = useUser(); return ( @@ -29,7 +29,7 @@ function Forbidden() {

You don't have access to this page!

- {user.isLogged ? ( + {isLogged ? (

If you think this is a mistake let us know via{' '} diff --git a/app/assets/scripts/components/new-atbd/index.js b/app/assets/scripts/components/new-atbd/index.js index 12a801ac..3696d2eb 100644 --- a/app/assets/scripts/components/new-atbd/index.js +++ b/app/assets/scripts/components/new-atbd/index.js @@ -164,14 +164,14 @@ const FeedbackLink = (props) => ( function NewAtbd() { const [showMoreInfo, setShowMoreInfo] = React.useState(false); - const { user } = useUser(); + const { isLogged } = useUser(); return (

ATBD Creation Choices

- {!user.isLogged && ( + {!isLogged && (
Sign up now to get started!