-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
**Notes for reviewers:** The diff has definitely too many files, since I moved one folder 😠 The files, that were actually meaningfully changed: - `/common/identity/*.ts` - **entire new folder, main thing to review** - `/tests/common/identity.test.tsx` - **tests for new functionality** - `/app/auth/(login|register).tsx` - **communication with backend, redirects, error handling** - `/app/dashboard.tsx` - stub file for dashboard - `/app/profiles/list.tsx` - stub file for profile selection, to be merged with #34 - `/common/util/mock-router.tsx` - self-explainatory All of the other changes are just renames, import fixes, etc. **Notes for all contributors:** Familiarize yourself with the functions exported from `@/common/identity`, example usage is show on the `login` and `register` pages.
- Loading branch information
1 parent
d46412e
commit d3e6129
Showing
42 changed files
with
777 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
android/** linguist-generated=true | ||
util/api/schema.d.ts linguist-generated=true | ||
common/api/schema.d.ts linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
*.md | ||
expo-env.d.ts | ||
util/api/schema.d.ts | ||
common/api/schema.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Button } from "react-native-paper"; | ||
|
||
import { useIdentity, RedirectIfNoProfile } from "@/common/identity"; | ||
import { MonoText } from "@/components/StyledText"; | ||
import { View } from "@/components/Themed"; | ||
|
||
const Page = () => { | ||
const identity = useIdentity(); | ||
|
||
if (!identity.hasProfile) { | ||
return <RedirectIfNoProfile identity={identity} />; | ||
} | ||
|
||
return ( | ||
<View> | ||
{/* TODO: This shouldn't be here */} | ||
<MonoText>{JSON.stringify(identity.profile, null, 2)}</MonoText> | ||
<Button onPress={() => identity.logOut()}>LOG OUT</Button> | ||
</View> | ||
); | ||
}; | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export { useAuth, AuthProvider } from "./auth"; | ||
export { POST, PUT, DELETE } from "./client"; | ||
export { BASE_URL } from "./consts"; | ||
export { useApi } from "./swr"; |
File renamed without changes.
Oops, something went wrong.