diff --git a/app/src/ModalContent.tsx b/app/src/ModalContent.tsx index c79a850b..1c3b957f 100644 --- a/app/src/ModalContent.tsx +++ b/app/src/ModalContent.tsx @@ -5,7 +5,8 @@ /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ import { useEffect, useState } from 'react' -import { TextView } from 'utopia-ui' +import { useNavigate } from 'react-router-dom' +import { TextView, useAuth } from 'utopia-ui' import { config } from './config' @@ -15,20 +16,35 @@ interface ChapterProps { } export function Welcome1({ clickAction1, map }: ChapterProps) { + const { isAuthenticated } = useAuth() + const navigate = useNavigate() + return ( <> {map.custom_text ? ( <> -
- +
+ {isAuthenticated ? ( + + ) : ( + + )}
) : ( @@ -45,15 +61,27 @@ export function Welcome1({ clickAction1, map }: ChapterProps) { Join us and grow the network by adding projects and events to the map.

Create your personal profile and place it on the map.

-
- +
+ {isAuthenticated ? ( + + ) : ( + + )}
)} diff --git a/lib/src/Components/Auth/index.tsx b/lib/src/Components/Auth/index.tsx index d1029e26..8d78b834 100644 --- a/lib/src/Components/Auth/index.tsx +++ b/lib/src/Components/Auth/index.tsx @@ -1,4 +1,4 @@ -export { AuthProvider } from './useAuth' +export { AuthProvider, useAuth } from './useAuth' export { LoginPage } from './LoginPage' export { SignupPage } from './SignupPage' export { RequestPasswordPage } from './RequestPasswordPage'