File tree 1 file changed +7
-1
lines changed 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { type MetaFunction } from '@remix-run/node'
2
2
import { Link } from '@remix-run/react'
3
3
import { Button } from '#app/components/ui/button.js'
4
+ import { useOptionalUser } from '#app/utils/user.js'
4
5
5
6
export const meta : MetaFunction = ( ) => [ { title : 'GratiText' } ]
6
7
7
8
export default function Index ( ) {
9
+ const user = useOptionalUser ( )
8
10
return (
9
11
< main className = "bg-gray-100 py-12" >
10
12
< section className = "container mx-auto px-4" >
@@ -115,7 +117,11 @@ export default function Index() {
115
117
</ div >
116
118
< div className = "mt-12 text-center" >
117
119
< Button asChild >
118
- < Link to = "/login" > Get Started</ Link >
120
+ { user ? (
121
+ < Link to = "/recipients" > Your Recipients</ Link >
122
+ ) : (
123
+ < Link to = "/login" > Get Started</ Link >
124
+ ) }
119
125
</ Button >
120
126
</ div >
121
127
</ section >
You can’t perform that action at this time.
0 commit comments