-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Setup boilerplate for the home screen #14 #35
Conversation
import { View } from "@/components/Themed"; | ||
|
||
const mockDashboardGadgets: ActionKey[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placeholder - this will be downloaded from the backend.
@@ -34,7 +37,7 @@ export const Landing = ({ debug = false }: { debug?: boolean }) => { | |||
{debug ? ( | |||
<> | |||
<MonoText style={styles.debug}> | |||
{new URL("/healthz", BASE_URL).toString()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was broken after the API change 😨
@@ -0,0 +1,16 @@ | |||
import type { Action } from "./types"; | |||
|
|||
export const actions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: #36
@@ -20,3 +20,13 @@ export const MockRouter = ({ | |||
location={new URL(initialRoute, "test://")} | |||
/> | |||
); | |||
|
|||
export const clearHistory = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
); | ||
const logOut = useCallback(() => setData({ known: "nothing" }), [setData]); | ||
const logOut = useCallback(() => { | ||
clearHistory(router, "/auth/login"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were many weird edge cases, e.g.:
- Log in
- Select profile
- Go from dashboard to menu
- Log out
- You now have the "back" button (going to the dashboard) visible - it doesn't do anything because of safety mechanisms from my last PR, but it is there nevertheless
We reset the router on every identity change to ensure that doesn't happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Obviously the specific buttons located on the dashboard and the menu are just placeholders, but we have the page "skeleton" set up.
Dashboard:
Menu (senior):
Menu (caretaker):