feat: go back to home
This commit is contained in:
+60
-13
@@ -456,6 +456,10 @@ const Home = ({ navigation, route }) => {
|
||||
setCoinModalVisible(false);
|
||||
}, []);
|
||||
|
||||
const handleNavigateToLanding = useCallback(() => {
|
||||
navigate(Routes.LandingPage);
|
||||
}, []);
|
||||
|
||||
const stageCardContainerStyle = isWeb ? styles.cardsGrid : styles.cardsStack;
|
||||
const stageCardItemStyle = isWeb
|
||||
? styles.webStageCard
|
||||
@@ -516,18 +520,32 @@ const Home = ({ navigation, route }) => {
|
||||
|
||||
const topBar = (
|
||||
<View style={styles.topBar}>
|
||||
{mobileInfoRow}
|
||||
<ProjectDropDown
|
||||
ref={projectDropdownRef}
|
||||
style={styles.projectDropDown}
|
||||
projects={projects}
|
||||
selectedProject={currentProject}
|
||||
allowEmptySelection
|
||||
onSelectProject={handleSelectProject}
|
||||
onModifyProject={handleModifyProject}
|
||||
onCreateProject={handleStartNew}
|
||||
formatDate={formatDate}
|
||||
/>
|
||||
<Pressable
|
||||
onPress={handleNavigateToLanding}
|
||||
accessibilityRole="button"
|
||||
style={[
|
||||
styles.returnLandingButton,
|
||||
isWeb ? styles.returnLandingButtonWeb : null,
|
||||
]}
|
||||
>
|
||||
<Text style={styles.returnLandingButtonText}>
|
||||
Retour à l'accueil
|
||||
</Text>
|
||||
</Pressable>
|
||||
<View style={styles.topBarContent}>
|
||||
{mobileInfoRow}
|
||||
<ProjectDropDown
|
||||
ref={projectDropdownRef}
|
||||
style={styles.projectDropDown}
|
||||
projects={projects}
|
||||
selectedProject={currentProject}
|
||||
allowEmptySelection
|
||||
onSelectProject={handleSelectProject}
|
||||
onModifyProject={handleModifyProject}
|
||||
onCreateProject={handleStartNew}
|
||||
formatDate={formatDate}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -710,11 +728,40 @@ const styles = StyleSheet.create({
|
||||
flexWrap: isWeb ? "wrap" : "nowrap",
|
||||
alignItems: isWeb ? "center" : "stretch",
|
||||
justifyContent: isWeb ? "center" : "flex-start",
|
||||
gap: 12,
|
||||
gap: isWeb ? 0 : 12,
|
||||
marginTop: isWeb ? 12 : 0,
|
||||
marginBottom: isWeb ? 4 : 16,
|
||||
paddingHorizontal: isWeb ? 0 : gutters,
|
||||
zIndex: 10,
|
||||
position: "relative",
|
||||
},
|
||||
returnLandingButton: {
|
||||
paddingHorizontal: 14,
|
||||
paddingVertical: 10,
|
||||
borderRadius: 18,
|
||||
backgroundColor: "rgba(12, 14, 18, 0.72)",
|
||||
borderWidth: 1,
|
||||
borderColor: "rgba(255, 255, 255, 0.1)",
|
||||
alignSelf: "flex-start",
|
||||
},
|
||||
returnLandingButtonWeb: {
|
||||
position: "absolute",
|
||||
left: 0,
|
||||
top: 0,
|
||||
transform: [{ translateY: -2 }],
|
||||
},
|
||||
returnLandingButtonText: {
|
||||
fontSize: 14,
|
||||
color: Palette.white,
|
||||
fontFamily: FONT_FAMILY.InterSemiBold,
|
||||
},
|
||||
topBarContent: {
|
||||
flex: 1,
|
||||
width: "100%",
|
||||
flexDirection: isWeb ? "row" : "column",
|
||||
alignItems: isWeb ? "center" : "stretch",
|
||||
justifyContent: isWeb ? "center" : "flex-start",
|
||||
gap: 12,
|
||||
},
|
||||
projectDropDown: {
|
||||
width: isWeb ? 420 : "100%",
|
||||
|
||||
Reference in New Issue
Block a user