diff --git a/package.json b/package.json index 6b0f0406..7419e504 100644 --- a/package.json +++ b/package.json @@ -94,4 +94,4 @@ "vite-tsconfig-paths": "^4.2.2", "vitest": "^1.1.0" } -} +} \ No newline at end of file diff --git a/src/App/routes/index.tsx b/src/App/routes/index.tsx index 61d690ba..ec193783 100644 --- a/src/App/routes/index.tsx +++ b/src/App/routes/index.tsx @@ -177,6 +177,18 @@ const pageNotFound = customWrapRoute({ visibility: 'anything', }, }); +const register = customWrapRoute({ + parent: rootLayout, + path: 'register', + component: { + render: () => import('#views/Register'), + props: {}, + }, + context: { + title: 'Register', + visibility: 'is-not-authenticated', + }, +}); const login = customWrapRoute({ parent: rootLayout, @@ -218,6 +230,7 @@ const wrappedRoutes = { pageNotFound, login, recoverAccount, + register, }; export const unwrappedRoutes = unwrapRoute(Object.values(wrappedRoutes)); diff --git a/src/components/Navbar/i18n.json b/src/components/Navbar/i18n.json index 78595b24..53916ec5 100644 --- a/src/components/Navbar/i18n.json +++ b/src/components/Navbar/i18n.json @@ -3,9 +3,10 @@ "strings": { "headerLogoAltText": "Alert Hub logo", "appLogin": "Login", + "appRegister":"Register", "appAbout": "About", "appResources": "Resources", "headerMenuHome": "Home", - "headerMenuMySubscription": "My Subscription" + "headerMenuMySubscription": "My Subscriptions" } } diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index f84881db..f8f5d86a 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -1,4 +1,5 @@ import { + Button, Heading, NavigationTabList, PageContainer, @@ -9,6 +10,7 @@ import { _cs } from '@togglecorp/fujs'; import goLogo from '#assets/icons/go-logo-2020.svg'; import Link from '#components/Link'; import NavigationTab from '#components/NavigationTab'; +import useAuth from '#hooks/useAuth'; import LangaugeDropdown from './LanguageDropdown'; @@ -21,6 +23,7 @@ interface Props { function Navbar(props: Props) { const { className } = props; const strings = useTranslation(i18n); + const { isAuthenticated } = useAuth(); return (