diff --git a/app.json b/app.json
index 7f49cf6b0..ff8e370c6 100644
--- a/app.json
+++ b/app.json
@@ -77,8 +77,6 @@
[
"@sentry/react-native/expo",
{
- "url": "https://sentry.io/",
- "note": "Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.",
"project": "vox",
"organization": "parti-renaissance"
}
diff --git a/app/(tabs)/(home)/_layout.tsx b/app/(tabs)/(home)/_layout.tsx
index 1f9660117..450d33c94 100644
--- a/app/(tabs)/(home)/_layout.tsx
+++ b/app/(tabs)/(home)/_layout.tsx
@@ -1,3 +1,5 @@
+import EuCampaignIllustration from '@/assets/illustrations/EuCampaignIllustration'
+import Header, { SmallHeader } from '@/components/Header/Header'
import { useSession } from '@/ctx/SessionProvider'
import { Redirect, Stack } from 'expo-router'
@@ -7,12 +9,13 @@ export default function AppLayout() {
if (!isAuth) {
return
}
+ const config = { title: '' }
return (
-
-
-
-
-
+
+ }} />
+
+
+
)
}
diff --git a/app/(tabs)/(home)/index.tsx b/app/(tabs)/(home)/index.tsx
index 784fec2fb..4e71a9e38 100644
--- a/app/(tabs)/(home)/index.tsx
+++ b/app/(tabs)/(home)/index.tsx
@@ -8,26 +8,13 @@ import MyProfileCard from '@/components/ProfileCards/ProfileCard/MyProfileCard'
import ProgramCTA from '@/components/ProfileCards/ProgramCTA/ProgramCTA'
import SkeCard from '@/components/Skeleton/CardSkeleton'
import * as metatags from '@/config/metatags'
-import { useSession } from '@/ctx/SessionProvider'
import HomeFeedList from '@/screens/home/feed/HomeFeedList'
-import { Redirect, Stack as RouterStack } from 'expo-router'
import Head from 'expo-router/head'
import { YStack } from 'tamagui'
const HomeScreen: React.FC = () => {
- const { isAuth } = useSession()
-
- if (!isAuth) {
- return
- }
-
return (
<>
-
{metatags.createTitle('Le fil')}
diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx
index 82c1de57c..10cbf8365 100644
--- a/app/(tabs)/_layout.tsx
+++ b/app/(tabs)/_layout.tsx
@@ -1,16 +1,18 @@
import React from 'react'
import { Pressable } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
-import NavBar from '@/components/Header/Header'
+import Text from '@/components/base/Text'
import WaitingScreen from '@/components/WaitingScreen'
import { ROUTES } from '@/config/routes'
import { useSession } from '@/ctx/SessionProvider'
import useInit from '@/hooks/useInit'
+import { getFocusedRouteNameFromRoute } from '@react-navigation/native'
+import type { Route } from '@react-navigation/routers'
import { parse, useURL } from 'expo-linking'
-import { Tabs, useGlobalSearchParams } from 'expo-router'
+import { Tabs, useGlobalSearchParams, useSegments } from 'expo-router'
import { isWeb, useMedia, View } from 'tamagui'
-const TAB_BAR_HEIGTH = 60
+const TAB_BAR_HEIGTH = 80
export default function AppLayout() {
const insets = useSafeAreaInsets()
@@ -22,6 +24,12 @@ export default function AppLayout() {
useInit()
+ const segments = useSegments()
+ const getTabBarVisibility = () => {
+ const hideOnScreens = ['tunnel', 'building-detail', 'polls'] // put here name of screen where you want to hide tabBar
+ return hideOnScreens.map((screen) => segments.includes(screen)).some(Boolean)
+ }
+
if (!isAuth && !isLoading && (code || url)) {
if (isWeb && code) {
signIn({ code })
@@ -41,18 +49,31 @@ export default function AppLayout() {
return (
,
+ headerShown: false,
tabBarLabel: () => null,
tabBarLabelPosition: 'below-icon',
tabBarButton: (props) => ,
+ tabBarHideOnKeyboard: true,
+ headerShadowVisible: false,
tabBarStyle: {
backgroundColor: 'white',
- borderTopWidth: 2,
- borderTopColor: 'rgba(145, 158, 171, 0.32)',
- display: media.gtSm || !session ? 'none' : 'flex',
+ borderTopWidth: 1,
+ shadowOffset: { width: 0, height: 0 },
+ elevation: 0,
+ borderTopColor: 'rgba(145, 158, 171, 0.2)',
+ display: media.gtSm || !session || getTabBarVisibility() ? 'none' : 'flex',
height: TAB_BAR_HEIGTH + insets.bottom,
+ alignContent: 'center',
+ justifyContent: 'center',
+ padding: 0,
+ paddingTop: 15,
+ },
+
+ tabBarItemStyle: {
+ paddingBottom: 20,
+ // paddingTop: 0,
},
}}
>
@@ -62,11 +83,13 @@ export default function AppLayout() {
name={route.name}
options={{
href: route.hidden === true ? null : undefined,
- tabBarLabel: route.screenName,
+ title: route.screenName,
+ tabBarLabel: ({ focused }) => (
+
+ {route.screenName}
+
+ ),
tabBarActiveTintColor: route.labelColor,
- tabBarLabelStyle: {
- marginBottom: 5,
- },
tabBarIcon: ({ focused }) => {
const Icon = ({ focused }) =>
diff --git a/app/(tabs)/actions/_layout.tsx b/app/(tabs)/actions/_layout.tsx
index d2583b764..345af8d53 100644
--- a/app/(tabs)/actions/_layout.tsx
+++ b/app/(tabs)/actions/_layout.tsx
@@ -1,10 +1,10 @@
-import { headerBlank } from '@/styles/navigationAppearance'
+import { SmallHeader } from '@/components/Header/Header'
import { Stack } from 'expo-router'
export default function AppLayout() {
return (
-
-
+
+
diff --git a/app/(tabs)/evenements/[id].tsx b/app/(tabs)/evenements/[id].tsx
index 23b23ef47..6057aa966 100644
--- a/app/(tabs)/evenements/[id].tsx
+++ b/app/(tabs)/evenements/[id].tsx
@@ -1,4 +1,5 @@
import React from 'react'
+import Error404 from '@/components/404/Error404'
import BoundarySuspenseWrapper from '@/components/BoundarySuspenseWrapper'
import PageLayout from '@/components/layouts/PageLayout/PageLayout'
import AppDownloadCTA from '@/components/ProfileCards/AppDownloadCTA/AppDownloadCTA'
@@ -15,6 +16,7 @@ import { isWeb, YStack } from 'tamagui'
const HomeScreen: React.FC = () => {
const params = useLocalSearchParams<{ id: string }>()
+ if (!params.id) return
return (
diff --git a/app/(tabs)/evenements/_layout.tsx b/app/(tabs)/evenements/_layout.tsx
index 88d277e9f..d4208ec36 100644
--- a/app/(tabs)/evenements/_layout.tsx
+++ b/app/(tabs)/evenements/_layout.tsx
@@ -1,11 +1,18 @@
-import { headerBlank } from '@/styles/navigationAppearance'
+import EuCampaignIllustration from '@/assets/illustrations/EuCampaignIllustration'
+import Header, { SmallHeader } from '@/components/Header/Header'
+import { useSession } from '@/ctx/SessionProvider'
import { Stack } from 'expo-router'
-export default function AppLayout() {
+export default function EventLayout() {
+ const { isAuth } = useSession()
return (
-
-
+ , animation: 'slide_from_right' }}>
+ , title: 'événements', headerLeft: () => }}
+ />
+
)
}
diff --git a/app/(tabs)/evenements/index.tsx b/app/(tabs)/evenements/index.tsx
index e42bfd72b..8eeb6e1a8 100644
--- a/app/(tabs)/evenements/index.tsx
+++ b/app/(tabs)/evenements/index.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import React, { useState } from 'react'
import BoundarySuspenseWrapper from '@/components/BoundarySuspenseWrapper'
import BottomSheetFilter from '@/components/EventFilterForm/BottomSheetFilters'
import EventFilterForm from '@/components/EventFilterForm/EventFilterForm'
@@ -9,21 +9,17 @@ import MyProfileCard from '@/components/ProfileCards/ProfileCard/MyProfileCard'
import ProfileLoginCTA from '@/components/ProfileCards/ProfileLoginCTA/ProfileLoginCTA'
import AuthFallbackWrapper from '@/components/Skeleton/AuthFallbackWrapper'
import SkeCard from '@/components/Skeleton/CardSkeleton'
+import { Tabs } from '@/components/Tabs/Tabs'
import * as metatags from '@/config/metatags'
import EventFeedList from '@/screens/events/EventFeedList'
-import { Stack as RouterStack } from 'expo-router'
import Head from 'expo-router/head'
-import { YStack } from 'tamagui'
+import { useMedia, YStack } from 'tamagui'
const EventsScreen: React.FC = () => {
+ const [activeTab, setActiveTab] = useState<'events' | 'myEvents'>('events')
+ const media = useMedia()
return (
<>
-
-
{metatags.createTitle('Nos événements')}
@@ -41,6 +37,16 @@ const EventsScreen: React.FC = () => {
+
+ value={activeTab}
+ onChange={setActiveTab}
+ grouped={media.lg}
+ $gtMd={{ paddingHorizontal: '$7', paddingTop: '$6', paddingBottom: 0 }}
+ >
+ Tous les événements
+ J'y participe
+
+
@@ -89,7 +95,7 @@ const EventsScreen: React.FC = () => {
}
>
-
+
diff --git a/app/(tabs)/porte-a-porte/_layout.tsx b/app/(tabs)/porte-a-porte/_layout.tsx
index 963eab101..7cf7fb8c8 100644
--- a/app/(tabs)/porte-a-porte/_layout.tsx
+++ b/app/(tabs)/porte-a-porte/_layout.tsx
@@ -1,15 +1,18 @@
-import MobileWallLayout from '@/components/MobileWallLayout/MobileWallLayout'
-import { headerBlank } from '@/styles/navigationAppearance'
+import { SmallHeader } from '@/components/Header/Header'
import { Stack } from 'expo-router'
-import { isWeb } from 'tamagui'
export default function DoorToDoorLayout() {
- return isWeb ? (
-
- ) : (
-
-
-
+ return (
+
+
+
+
)
}
diff --git a/app/(tabs)/porte-a-porte/building-detail.tsx b/app/(tabs)/porte-a-porte/building-detail.tsx
index 380c8272d..772949e14 100644
--- a/app/(tabs)/porte-a-porte/building-detail.tsx
+++ b/app/(tabs)/porte-a-porte/building-detail.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useLayoutEffect, useState } from 'react'
-import { Image, Modal, RefreshControl, SafeAreaView, ScrollView, StyleSheet, Text, View } from 'react-native'
+import { Modal, RefreshControl, SafeAreaView, ScrollView, StyleSheet, Text, View } from 'react-native'
import { BuildingBlock, BuildingBlockHelper } from '@/core/entities/BuildingBlock'
import { BuildingHistoryPoint } from '@/core/entities/BuildingHistory'
import { BuildingType, DoorToDoorAddress } from '@/core/entities/DoorToDoor'
@@ -27,7 +27,6 @@ import AlphabetHelper from '@/utils/AlphabetHelper'
import i18n from '@/utils/i18n'
import { useIsFocused } from '@react-navigation/native'
import { router, useNavigation } from 'expo-router'
-import { last } from 'lodash'
enum Tab {
HISTORY,
@@ -44,7 +43,7 @@ const BuildingDetailScreen = () => {
const [campaignCardViewModel, setCampaignCardViewModel] = useState()
const dtdStore = useDoorToDoorStore()
const { setTunnel } = useDtdTunnelStore()
- const [address, setAddress] = useState(dtdStore.address)
+ const [address, setAddress] = useState(dtdStore.address as DoorToDoorAddress)
const [rankingModalState, setRankingModalState] = useState({ visible: false })
const viewModel = BuildingDetailScreenViewModelMapper.map(address!, history, layout)
const buildingBlockHelper = new BuildingBlockHelper()
@@ -59,6 +58,9 @@ const BuildingDetailScreen = () => {
})
const fetchLayout = async (): Promise> => {
+ if (!dtdStore.address) {
+ throw new Error('No address found')
+ }
return await new UpdateBuildingLayoutInteractor().execute(
dtdStore.address.building.id,
campaignStatistics.campaignId,
@@ -68,6 +70,9 @@ const BuildingDetailScreen = () => {
}
const fetchHistory = async (): Promise> => {
+ if (!dtdStore.address) {
+ throw new Error('No address found')
+ }
return await DoorToDoorRepository.getInstance().buildingHistory(dtdStore.address.building.id, campaignStatistics.campaignId)
}
@@ -284,7 +289,7 @@ const BuildingDetailScreen = () => {
campaignId: campaignStatistics.campaignId,
buildingParams: {
id: address.building.id,
- block: block?.name,
+ block: block?.name!,
floor: floorNumber,
type: address.building.type,
door: door,
diff --git a/app/(tabs)/porte-a-porte/index.tsx b/app/(tabs)/porte-a-porte/index.tsx
index 223f76067..7f1eb6944 100644
--- a/app/(tabs)/porte-a-porte/index.tsx
+++ b/app/(tabs)/porte-a-porte/index.tsx
@@ -1,6 +1,7 @@
import React, { memo, useCallback, useState } from 'react'
-import { Modal, SafeAreaView, StyleSheet, Text, View } from 'react-native'
+import { Modal, SafeAreaView, StyleSheet, View } from 'react-native'
import { LatLng, Region } from '@/components/Maps/Maps'
+import MobileWallLayout from '@/components/MobileWallLayout/MobileWallLayout'
import { DoorToDoorCharterNotAccepted } from '@/core/entities/DoorToDoorCharterState'
import { GetDoorToDoorAddressesInteractor } from '@/core/interactor/GetDoorToDoorAddressesInteractor'
import DoorToDoorRepository from '@/data/DoorToDoorRepository'
@@ -19,7 +20,8 @@ import i18n from '@/utils/i18n'
import { useOnFocus } from '@/utils/useOnFocus.hook'
import { useQuery } from '@tanstack/react-query'
import * as Geolocation from 'expo-location'
-import { router } from 'expo-router'
+import { router, useRootNavigationState } from 'expo-router'
+import { isWeb } from 'tamagui'
const DoorToDoorMapView = memo(_DoorToDoorMapView)
@@ -162,12 +164,12 @@ const DoorToDoorScreen = () => {
)}
-
+ {/*
{i18n.t('doorToDoor.title')}
{!error && }
-
+ */}
{renderContent()}
)
@@ -198,4 +200,4 @@ const styles = StyleSheet.create({
},
})
-export default DoorToDoorScreen
+export default isWeb ? MobileWallLayout : DoorToDoorScreen
diff --git a/app/(tabs)/porte-a-porte/tunnel/_layout.tsx b/app/(tabs)/porte-a-porte/tunnel/_layout.tsx
index fa46b3c16..0d511cc38 100644
--- a/app/(tabs)/porte-a-porte/tunnel/_layout.tsx
+++ b/app/(tabs)/porte-a-porte/tunnel/_layout.tsx
@@ -1,7 +1,7 @@
-import React, { FunctionComponent } from 'react'
+import React, { FunctionComponent, useEffect } from 'react'
import { headerBlank } from '@/styles/navigationAppearance'
import i18n from '@/utils/i18n'
-import { Stack } from 'expo-router'
+import { Stack, useNavigation, useRootNavigationState } from 'expo-router'
const DoorToDoorTunnelModalNavigator: FunctionComponent = () => {
return (
diff --git a/app/(tabs)/profil/_layout.tsx b/app/(tabs)/profil/_layout.tsx
index ca01fd3e1..aa2bc4a40 100644
--- a/app/(tabs)/profil/_layout.tsx
+++ b/app/(tabs)/profil/_layout.tsx
@@ -1,5 +1,5 @@
+import { SmallHeader } from '@/components/Header/Header'
import { useSession } from '@/ctx/SessionProvider'
-import { headerBlank } from '@/styles/navigationAppearance'
import i18n from '@/utils/i18n'
import { Redirect, Stack } from 'expo-router'
@@ -11,8 +11,8 @@ export default function AppLayout() {
}
return (
-
-
+
+
diff --git a/app/(tabs)/profil/index.tsx b/app/(tabs)/profil/index.tsx
index 21c049ea1..5b4fb0ddc 100644
--- a/app/(tabs)/profil/index.tsx
+++ b/app/(tabs)/profil/index.tsx
@@ -16,11 +16,7 @@ function ProfilScreen() {
{metatags.createTitle('Mon profil')}
-
+
diff --git a/app/(tabs)/ressources/_layout.tsx b/app/(tabs)/ressources/_layout.tsx
index 5311b9c64..6f1ba3b02 100644
--- a/app/(tabs)/ressources/_layout.tsx
+++ b/app/(tabs)/ressources/_layout.tsx
@@ -1,5 +1,5 @@
+import { SmallHeader } from '@/components/Header/Header'
import { useSession } from '@/ctx/SessionProvider'
-import { headerBlank } from '@/styles/navigationAppearance'
import { Redirect, Stack } from 'expo-router'
export default function ActionsScreen() {
@@ -10,8 +10,8 @@ export default function ActionsScreen() {
}
return (
-
-
+
+
)
}
diff --git a/app/(tabs)/ressources/index.tsx b/app/(tabs)/ressources/index.tsx
index 5eb0981bb..9d27f22da 100644
--- a/app/(tabs)/ressources/index.tsx
+++ b/app/(tabs)/ressources/index.tsx
@@ -6,7 +6,6 @@ import MyProfileCard from '@/components/ProfileCards/ProfileCard/MyProfileCard'
import SkeCard from '@/components/Skeleton/CardSkeleton'
import * as metatags from '@/config/metatags'
import ResourcesList from '@/screens/tools/ResourcesList'
-import { Stack as RouterStack } from 'expo-router'
import Head from 'expo-router/head'
import { View, YStack } from 'tamagui'
@@ -43,12 +42,6 @@ const ToolsSkeleton = () => {
const ToolsScreen: React.FC = () => {
return (
<>
-
-
{metatags.createTitle('Ressources')}
diff --git a/app/[...unmatched].tsx b/app/[...unmatched].tsx
index 2e329b5c4..7c278f650 100644
--- a/app/[...unmatched].tsx
+++ b/app/[...unmatched].tsx
@@ -2,18 +2,15 @@ import { useColorScheme } from 'react-native'
import Error404 from '@/components/404/Error404'
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'
import { TamaguiProvider } from '@tamagui/core'
-import { Unmatched } from 'expo-router'
-// export default function UnmatchedRoute() {
-// const colorScheme = useColorScheme()
+export default function UnmatchedRoute() {
+ const colorScheme = useColorScheme()
-// return (
-//
-//
-//
-//
-//
-// )
-// }
-
-export default Unmatched
+ return (
+
+
+
+
+
+ )
+}
diff --git a/package.json b/package.json
index 5ea454b5c..32d16bde9 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
"country-data": "^0.0.31",
"date-fns": "^3.6.0",
"date-fns-tz": "^3.1.3",
- "expo": "~51.0.7",
+ "expo": "~51.0.8",
"expo-application": "~5.9.1",
"expo-auth-session": "~5.5.2",
"expo-blur": "~13.0.2",
@@ -90,7 +90,7 @@
"i18next": "^23.7.16",
"intl-pluralrules": "^2.0.1",
"jest": "^29.3.1",
- "jest-expo": "~51.0.1",
+ "jest-expo": "~51.0.2",
"jotai": "^2.6.2",
"ky": "0.28.7",
"localized-address-format": "^1.3.1",
diff --git a/src/assets/icons/nav/DoorIcon.tsx b/src/assets/icons/nav/DoorIcon.tsx
index a1e665d71..1e46566bc 100644
--- a/src/assets/icons/nav/DoorIcon.tsx
+++ b/src/assets/icons/nav/DoorIcon.tsx
@@ -37,13 +37,13 @@ const Icon = (props) => {
fillRule="evenodd"
clipRule="evenodd"
d="M15 10.5a.488.488 0 01-.5.488l-3.1-.078a.41.41 0 010-.82l3.1-.077c.274-.007.5.213.5.487z"
- fill={getFillUrl(3)}
+ fill={getFillUrl(2)}
/>
@@ -61,10 +61,6 @@ const Icon = (props) => {
-
-
-
-
))}
diff --git a/src/assets/icons/nav/ToolsIcon.tsx b/src/assets/icons/nav/ToolsIcon.tsx
index f7a73cf95..c0766b5a3 100644
--- a/src/assets/icons/nav/ToolsIcon.tsx
+++ b/src/assets/icons/nav/ToolsIcon.tsx
@@ -4,8 +4,8 @@ import type { IconProps } from '@tamagui/helpers-icon'
import { themed } from '@tamagui/helpers-icon'
const inactiveColors = [
- ['#AEB9C3', '#848E9B'],
['#D7DCE1', '#C1C7CD'],
+ ['#AEB9C3', '#848E9B'],
]
const activeColors = [
diff --git a/src/components/AutoSizeImage.tsx b/src/components/AutoSizeImage.tsx
index 39f41a2a0..f4a2698b3 100644
--- a/src/components/AutoSizeImage.tsx
+++ b/src/components/AutoSizeImage.tsx
@@ -1,5 +1,6 @@
import { useMemo, useState } from 'react'
import { StyleSheet, TouchableOpacity, View } from 'react-native'
+import Animated from 'react-native-reanimated'
import { FontAwesome } from '@expo/vector-icons'
import { Image } from 'expo-image'
@@ -24,7 +25,7 @@ function AutoSizeImage(props: AutoSizeImageProps) {
: undefined
return (
-
+
)}
-
+
)
}
diff --git a/src/components/Cards/EventCard/EventCard.tsx b/src/components/Cards/EventCard/EventCard.tsx
index 58c96b437..5dfaa72d0 100644
--- a/src/components/Cards/EventCard/EventCard.tsx
+++ b/src/components/Cards/EventCard/EventCard.tsx
@@ -6,7 +6,7 @@ import VoxCard, { VoxCardAuthorProps, VoxCardDateProps, VoxCardFrameProps, VoxCa
import { useSession } from '@/ctx/SessionProvider'
import { useSubscribeEvent, useUnsubscribeEvent } from '@/hooks/useEvents'
import { router } from 'expo-router'
-import { XStack } from 'tamagui'
+import { Spinner, XStack } from 'tamagui'
import { useDebouncedCallback } from 'use-debounce'
type VoxCardBasePayload = {
@@ -40,14 +40,15 @@ export const SubscribeEventButton = ({
...btnProps
}: { eventId: string; isSubscribed: boolean; outside?: boolean } & ComponentProps) => {
const { session } = useSession()
- const { mutate: subscribe } = useSubscribeEvent({ id })
- const { mutate: unsubscribe } = useUnsubscribeEvent({ id })
+ const { mutate: subscribe, isPending: isSubPending } = useSubscribeEvent({ id })
+ const { mutate: unsubscribe, isPending: isUnSubPending } = useUnsubscribeEvent({ id })
const handleSubscribe = useDebouncedCallback(() => (isSubscribed ? unsubscribe() : subscribe()), 200)
const outsideStyle = outside ? ({ size: 'lg', width: '100%' } as const) : {}
return isSubscribed ? (
) : (
@@ -66,6 +67,7 @@ export const SubscribeEventButton = ({
{...outsideStyle}
>
M'inscrire
+ {isSubPending ? : null}
)
}
diff --git a/src/components/Cards/NewsCard/NewsCard.tsx b/src/components/Cards/NewsCard/NewsCard.tsx
index 4b3227e53..059d992bd 100644
--- a/src/components/Cards/NewsCard/NewsCard.tsx
+++ b/src/components/Cards/NewsCard/NewsCard.tsx
@@ -26,10 +26,10 @@ const NewsCard = ({ payload, onShare, onShow, ...props }: NewsVoxCardProps) => {
{payload.title}
- {payload.image && }
+ {!!payload.image && }
{payload.description}
- {payload.author.name && }
- {payload.ctaLabel && (
+ {!!payload.author.name && }
+ {!!payload.ctaLabel && (