@@ -3,7 +3,7 @@ import { createFileRoute, redirect } from "@tanstack/react-router";
33import { useTranslation } from "@dropit/i18n" ;
44import { Button } from "@/shared/components/ui/button" ;
55import { Card , CardContent , CardDescription , CardHeader , CardTitle } from "@/shared/components/ui/card" ;
6- import { Smartphone , Download , Apple , Chrome , ArrowRight , CheckCircle , Star } from "lucide-react" ;
6+ import { Smartphone , Download , Apple , ArrowRight , CheckCircle , Star } from "lucide-react" ;
77import { Badge } from "@/shared/components/ui/badge" ;
88import { useState , useEffect } from "react" ;
99
@@ -13,17 +13,6 @@ export const Route = createFileRoute('/download-app')({
1313 if ( ! session ) {
1414 throw redirect ( { to : '/login' } ) ;
1515 }
16-
17- try {
18- // Vérifier si l'utilisateur a un membre actif dans une organisation
19- const activeMember = await authClient . organization . getActiveMember ( ) ;
20- if ( ! activeMember ?. data ) {
21- throw redirect ( { to : '/onboarding' } ) ;
22- }
23- } catch ( error ) {
24- // Si erreur lors de la récupération du membre actif, rediriger vers onboarding
25- throw redirect ( { to : '/onboarding' } ) ;
26- }
2716 } ,
2817 component : DownloadAppPage ,
2918} ) ;
@@ -53,7 +42,7 @@ function DownloadAppPage() {
5342 // Vérifier si l'utilisateur est un membre (athlète)
5443 const isAthlete = activeMember ?. role === 'member' ;
5544
56- const handleDownload = ( platform : 'ios' | 'android' | 'web' ) => {
45+ const handleDownload = ( platform : 'ios' | 'android' ) => {
5746 // TODO: Implémenter les liens de téléchargement
5847 switch ( platform ) {
5948 case 'ios' :
@@ -62,15 +51,11 @@ function DownloadAppPage() {
6251 case 'android' :
6352 window . open ( 'https://play.google.com/store/apps/details?id=com.dropit' , '_blank' ) ;
6453 break ;
65- case 'web' :
66- // Rediriger vers la version web mobile
67- window . location . href = '/mobile' ;
68- break ;
6954 }
7055 } ;
7156
7257 return (
73- < div className = "min-h-screen bg-gradient-to-br from-purple-50 to-indigo-100 flex items-center justify-center p-4" >
58+ < div className = "min-h-screen flex items-center justify-center p-4" >
7459 < div className = "w-full max-w-4xl mx-auto" >
7560 < div className = "text-center mb-8" >
7661 < div className = "mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-purple-100" >
@@ -81,30 +66,22 @@ function DownloadAppPage() {
8166 </ h1 >
8267 < p className = "text-xl text-gray-600 max-w-2xl mx-auto" >
8368 { isAthlete
84- ? 'En tant qu\'athlète, votre expérience optimale se trouve sur notre application mobile. Téléchargez l\'app pour accéder à tous vos entraînements, performances et communications avec votre coach. '
69+ ? 'L\'interface web est réservée aux coachs pour la gestion des programmes d\'entraînement. Votre espace athlète vous attend sur mobile ! '
8570 : t ( 'download_app.description' )
8671 }
8772 </ p >
88- { isAthlete && (
89- < div className = "mt-4 p-4 bg-purple-50 rounded-lg max-w-2xl mx-auto" >
90- < p className = "text-sm text-purple-700" >
91- 💡 L'interface web est réservée aux coachs pour la gestion des programmes d'entraînement.
92- Votre espace athlète vous attend sur mobile !
93- </ p >
94- </ div >
95- ) }
9673 </ div >
9774
98- < div className = "grid md:grid-cols-2 gap-8 items-start " >
75+ < div className = "grid md:grid-cols-2 gap-8 items-stretch " >
9976 { /* Carte principale */ }
100- < Card className = "w-full" >
77+ < Card className = "w-full h-full flex flex-col shadow-none " >
10178 < CardHeader className = "text-center" >
10279 < CardTitle className = "text-2xl" > { t ( 'download_app.download_section.title' ) } </ CardTitle >
10380 < CardDescription >
10481 { t ( 'download_app.download_section.subtitle' ) }
10582 </ CardDescription >
10683 </ CardHeader >
107- < CardContent className = "space-y-4" >
84+ < CardContent className = "space-y-4 flex-1 flex flex-col justify-center " >
10885 { /* App Store */ }
10986 < Button
11087 onClick = { ( ) => handleDownload ( 'ios' ) }
@@ -132,26 +109,11 @@ function DownloadAppPage() {
132109 </ div >
133110 < ArrowRight className = "h-5 w-5 ml-auto" />
134111 </ Button >
135-
136- { /* Version Web */ }
137- < Button
138- onClick = { ( ) => handleDownload ( 'web' ) }
139- variant = "outline"
140- className = "w-full h-16 text-lg"
141- size = "lg"
142- >
143- < Chrome className = "h-6 w-6 mr-3" />
144- < div className = "text-left" >
145- < div className = "text-xs" > { t ( 'download_app.platforms.web.label' ) } </ div >
146- < div className = "font-semibold" > { t ( 'download_app.platforms.web.store' ) } </ div >
147- </ div >
148- < ArrowRight className = "h-5 w-5 ml-auto" />
149- </ Button >
150112 </ CardContent >
151113 </ Card >
152114
153115 { /* Carte des fonctionnalités */ }
154- < Card className = "w-full" >
116+ < Card className = "w-full h-full flex flex-col shadow-none " >
155117 < CardHeader >
156118 < CardTitle className = "flex items-center gap-2" >
157119 < Star className = "h-5 w-5 text-yellow-500" />
@@ -161,7 +123,7 @@ function DownloadAppPage() {
161123 { t ( 'download_app.features.subtitle' ) }
162124 </ CardDescription >
163125 </ CardHeader >
164- < CardContent >
126+ < CardContent className = "flex-1 flex flex-col" >
165127 < div className = "space-y-3" >
166128 { features . map ( ( feature ) => (
167129 < div key = { feature } className = "flex items-start gap-3" >
0 commit comments