Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Jun 1, 2024
1 parent d692bbc commit 67844f7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ Users use OPAQUE to authenticate with the server. After Login the server creates

## Todos

- fix all ts issues
- setup CI (ts:check)
- implement frontend from jumpstart
- implement auth (from jumpstart)
- add invitation scheme
26 changes: 22 additions & 4 deletions apps/app/src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import { Link } from "expo-router";
import * as React from "react";
import { Text } from "react-native";
import { View } from "react-native";
import { Text } from "~/components/ui/text";
import { trpc } from "../utils/trpc";

const Lists: React.FC = () => {
const meQuery = trpc.me.useQuery(undefined, {
// avoid lot's of retries in case of unauthorized blocking a page load
retry: (failureCount, error) => {
if (error.data?.code === "UNAUTHORIZED") {
return false;
}
if (failureCount > 3) return false;
return true;
},
});

console.log(meQuery);

return (
<Text>
Hello WOrld{" "}
<View>
<Link
href={{
pathname: "/list/[listId]",
Expand All @@ -16,7 +30,11 @@ const Lists: React.FC = () => {
</Link>
<Link href="/login">Login</Link>
<Link href="/register">Register</Link>
</Text>

<View>
<Text>{meQuery.data?.username}</Text>
</View>
</View>
);
};

Expand Down
10 changes: 2 additions & 8 deletions apps/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"baseUrl": ".",
"paths": {
"~/*": [
"src/rnr/*"
]
"~/*": ["./src/rnr/*"]
}
},
"include": [
"**/*.ts",
"**/*.tsx"
]
"include": ["**/*.ts", "**/*.tsx"]
}

0 comments on commit 67844f7

Please sign in to comment.