File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
src/frontend/src/components/home Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1+ import { Link } from 'react-router-dom' ;
2+ import { useAuth } from '../../context/AuthContext' ;
13import { Button } from '../ui' ;
24
35const HeroSection = ( ) => {
6+ const { isAuthenticated } = useAuth ( ) ;
7+
48 return (
59 < section className = "relative py-16 lg:py-24 overflow-hidden" >
610 < div className = "absolute inset-0 bg-gradient-to-b from-dark-900 via-dark-950 to-dark-900" />
@@ -21,12 +25,16 @@ const HeroSection = () => {
2125 </ p >
2226
2327 < div className = "flex flex-col sm:flex-row gap-4 justify-center lg:justify-start" >
24- < Button size = "lg" >
25- Créer un personnage
26- </ Button >
27- < Button variant = "outline" size = "lg" >
28- Explorer la galerie
29- </ Button >
28+ < Link to = { isAuthenticated ? '/characters/create' : '/register' } >
29+ < Button size = "lg" >
30+ Créer un personnage
31+ </ Button >
32+ </ Link >
33+ < Link to = "/galerie" >
34+ < Button variant = "outline" size = "lg" >
35+ Explorer la galerie
36+ </ Button >
37+ </ Link >
3038 </ div >
3139 </ div >
3240
You can’t perform that action at this time.
0 commit comments