We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8a27cc commit 1e786b2Copy full SHA for 1e786b2
app/features/welcome/index.tsx
@@ -0,0 +1,23 @@
1
+import Login from "~/features/login";
2
+
3
+import { useAuth } from "~/providers/AuthProvider";
4
5
+export default function Welcome() {
6
+ const { isLogin, isLoading } = useAuth();
7
8
+ if (isLoading) {
9
+ return <div>Loading...</div>;
10
+ }
11
12
+ return (
13
+ <>
14
+ {isLogin ? (
15
+ <div>
16
+ <h1>Welcome to the app</h1>
17
+ </div>
18
+ ) : (
19
+ <Login />
20
+ )}
21
+ </>
22
+ );
23
+}
app/routes/home.tsx
@@ -1,4 +1,4 @@
-import Login from "~/features/login";
+import Welcome from "~/features/welcome";
export function meta() {
return [
@@ -8,5 +8,5 @@ export function meta() {
}
export default function Home() {
- return <Login />;
+ return <Welcome />;
0 commit comments