diff --git a/app/pages/CurrentUser.tsx b/app/pages/CurrentUser.tsx new file mode 100644 index 0000000..77a22c0 --- /dev/null +++ b/app/pages/CurrentUser.tsx @@ -0,0 +1,79 @@ +import React from "react" +import { useCurrentUser } from "app/hooks/useCurrentUser" +export const CurrentUser = () => { + const currentUser = useCurrentUser() + currentUser ? ( +
+
+ Home +
+
+ Fietsen +
+
+ ) : ( +
+
+ Home +
+
+ Fietsen +
+
+ ) + return <> +} diff --git a/app/pages/index.tsx b/app/pages/index.tsx index 69fa928..be23606 100644 --- a/app/pages/index.tsx +++ b/app/pages/index.tsx @@ -7,7 +7,7 @@ import { LabeledTextField } from "app/components/LabeledTextField" import { Form, FORM_ERROR } from "app/components/Form" import login from "app/auth/mutations/login" import { LoginInput, LoginInputType } from "app/auth/validations" -import { CurrentUser } from "app/pages/CurrentUser" +import { CurrentUser } from "./CurrentUser" type LoginFormProps = { onSuccess?: () => void onLogOut?: () => void