diff --git a/src/components/BaseHeader.js b/src/components/BaseHeader.js index ce1b7d5..809d19e 100644 --- a/src/components/BaseHeader.js +++ b/src/components/BaseHeader.js @@ -1,5 +1,5 @@ -import React from "reactn"; import { Image, Pressable, Text, View } from "react-native"; +import React from "reactn"; import { responsiveWidth } from "../actions/responsiveSizes.js"; import { icons } from "../assets"; @@ -11,7 +11,7 @@ import { navigate } from "../navigation/NavigationService"; import useLayoutType, { sidebarWidth } from "../hooks/useLayoutType.js"; import useNotifications from "../hooks/useNotifications"; -export default ({ title = "", containerStyle = {} }) => { +export default ({ title = "", containerStyle = {}, bell = false }) => { const { isDesktop } = useLayoutType(); const notificationsContext = useNotifications(); const unreadCount = notificationsContext?.unreadCount || 0; @@ -45,13 +45,15 @@ export default ({ title = "", containerStyle = {} }) => { navigate(Routes.Notifications)}> - + {bell && ( + + )} {hasUnread ? ( { + navigate(Routes.Login); + }; + + return ( + + + + {"Se connecter"} + + + + + ); +} diff --git a/src/components/GradientButton.js b/src/components/GradientButton.js index 0b9c38d..cfc3e92 100644 --- a/src/components/GradientButton.js +++ b/src/components/GradientButton.js @@ -44,6 +44,7 @@ const GradientButton = ({ fontSize: 15, color: Palette.white, fontFamily: FONT_FAMILY.InterMedium, + paddingHorizontal: 10, }} > {title} diff --git a/src/layouts/Page.js b/src/layouts/Page.js index a749efb..1b67efd 100644 --- a/src/layouts/Page.js +++ b/src/layouts/Page.js @@ -5,6 +5,7 @@ import { SafeAreaView } from "react-native-safe-area-context"; import React from "reactn"; import { responsiveHeight } from "../actions/responsiveSizes.js"; import BaseHeader from "../components/BaseHeader"; +import ConnectBtn from "../components/ConnectBtn.js"; import NavigateHeader from "../components/NavigateHeader"; import ShareBtn from "../components/ShareBtn/ShareBtn"; import { isWeb } from "../hooks/useLayoutType.js"; @@ -35,6 +36,7 @@ export default ({ width = undefined, maxWidth = 1200, shareBtn = false, + connect = false, blurIntensity = 0, }) => { const PageContainer = @@ -117,14 +119,20 @@ export default ({ {bottomStickyContent?.()} - {shareBtn && isWeb && ( - + > + {shareBtn && } + {connect && } + )} ); diff --git a/src/navigation/MainStack.js b/src/navigation/MainStack.js index ff24b2c..be92f72 100644 --- a/src/navigation/MainStack.js +++ b/src/navigation/MainStack.js @@ -4,6 +4,7 @@ import { Platform } from "react-native"; import CreatePassword from "../screens/CreatePassword"; import CreatePseudo from "../screens/CreatePseudo"; import ForgotPassword from "../screens/ForgotPassword"; +import LandingPage from "../screens/LandingPage"; import AllMyList from "../screens/Library/AllMyList"; import AllMyPlaylist from "../screens/Library/AllMyPlaylist"; import MusicDetails from "../screens/Library/MusicDetails"; @@ -86,6 +87,7 @@ const screens = [ { name: Routes.Splash, component: Splash }, { name: Routes.Onboarding, component: Onboarding }, { name: Routes.Login, component: Login, title: "Connexion" }, + { name: Routes.LandingPage, component: LandingPage }, { name: Routes.ForgotPassword, component: ForgotPassword, diff --git a/src/navigation/Routes.js b/src/navigation/Routes.js index c4a1995..a476493 100644 --- a/src/navigation/Routes.js +++ b/src/navigation/Routes.js @@ -6,7 +6,7 @@ export const Routes = { Register: "Register", CreatePassword: "CreatePassword", CreatePseudo: "CreatePseudo", - + LandingPage: "LandingPage", BottomTab: "BottomTab", Welcome: "Welcome", diff --git a/src/screens/LandingPage.js b/src/screens/LandingPage.js new file mode 100644 index 0000000..c6ea4c5 --- /dev/null +++ b/src/screens/LandingPage.js @@ -0,0 +1,25 @@ +import { View } from "react-native"; +import { background } from "../assets"; +import GradientButton from "../components/GradientButton"; +import Page from "../layouts/Page"; + +export default function LandingPage() { + return ( + + + {}} /> + + + ); +} diff --git a/src/screens/Splash.js b/src/screens/Splash.js index 1ab293a..0aa14c5 100644 --- a/src/screens/Splash.js +++ b/src/screens/Splash.js @@ -39,7 +39,7 @@ export default ({ navigation }) => { index: 0, routes: [ { - name: Routes.Login, + name: Routes.LandingPage, }, ], });