You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mobile/components/WelcomeComponent.tsx

41 lines
1.2 KiB

import { useSession } from "@/ctx";
import React from "react";
import { Image, ImageBackground, Text, View } from "react-native";
export default function WelcomeComponent() {
const date = new Date();
const formattedDate = date.toLocaleDateString("fr-FR", {
year: "numeric",
month: "long",
day: "numeric",
});
const { session } = useSession();
return (
<View className="rounded-2xl overflow-hidden shadow-lg h-full bg-black justify-center">
<ImageBackground
source={require("assets/images/black-back.png")}
className="w-full h-full justify-center"
>
<View className="flex-row items-center justify-between">
<View className="flex-row items-center w-full">
<Image
className="h-16 w-16 rounded-2xl"
source={require("assets/images/sigma-profile.jpeg")}
/>
<View>
<Text className="text-gray-500 font-semibold ml-4">
{formattedDate}
</Text>
<Text className="text-white text-4xl ml-4 mt-0.5">
Hello {session?.name} !
</Text>
</View>
</View>
</View>
</ImageBackground>
</View>
);
}