Skip to content

Commit

Permalink
(core) feat(endscreen): fixed button display (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
arenault-pass authored Feb 11, 2024
1 parent 037adb7 commit 631c469
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ module.exports = {
plugins: ["react"],
rules: {
quotes: ["error", "double"],
"react/no-unescaped-entities": 0,
},
};
2 changes: 1 addition & 1 deletion provider/ImageContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { createContext, useContext, useMemo } from "react";

const ImageContext = createContext();

export const ImageProvider = ({ children, backgroundImageSource }) => {
export const ImageProvider = ({ children, backgroundImageSource }) => { /* eslint-disable react/prop-types */ // TODO: upgrade to latest eslint tooling

Check failure on line 5 in provider/ImageContext.js

View workflow job for this annotation

GitHub Actions / lint

'children' is missing in props validation

Check failure on line 5 in provider/ImageContext.js

View workflow job for this annotation

GitHub Actions / lint

'backgroundImageSource' is missing in props validation
const contextValue = useMemo(() => ({ backgroundImageSource }), [
backgroundImageSource,
]);
Expand Down
9 changes: 4 additions & 5 deletions screens/Endscreen.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { View, Text, ImageBackground, TouchableOpacity, FlatList } from "react-native";
import { View, Text, ImageBackground, TouchableOpacity } from "react-native";
import React from "react";
import { SafeAreaView } from "react-native-safe-area-context";
import { StatusBar } from "expo-status-bar";
Expand Down Expand Up @@ -41,17 +41,16 @@ export default function Endscreen() {

</View>
{/* Button */}
<View className="flex-1 justify-center items-center ">
<View className="flex-1 items-center ">
<TouchableOpacity

className=" bg-white w-50 px-4 py-4 border-solid rounded-lg mt-4 justify-center align-items-center"
className=" bg-white w-36 px-4 py-4 border-solid rounded-lg "
>
<Text className="text-cyan-900 text-sm text-center font-bold">
Recommencer
</Text>
</TouchableOpacity>
<TouchableOpacity
className=" bg-white w-50 px-4 py-4 border-solid rounded-lg mt-4 justify-center align-items-center"
className=" bg-white w-36 px-4 py-4 border-solid rounded-lg mt-4 "
>
<Text className="text-cyan-900 text-sm text-center font-bold">
Accueil
Expand Down
5 changes: 2 additions & 3 deletions screens/Homescreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { SafeAreaView } from "react-native-safe-area-context";
import { StatusBar } from "expo-status-bar";
import { Image } from "react-native";
import { useNavigation } from "@react-navigation/native";
import { useEffect } from "react";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { useImage } from "../provider/ImageContext";

Expand All @@ -17,7 +16,7 @@ export default function HomeScreen() {
AsyncStorage.clear();
navigation.navigate("Lobby");
};

/* eslint-disable react/no-unescaped-entities */
return (
<View className="flex-1">
<ImageBackground blurRadius={70}
Expand All @@ -28,7 +27,7 @@ export default function HomeScreen() {
<StatusBar style="light" />
{/* Header */}
<View className="pb-4 m-4 justify-center items-center">
<Text className="text-white text-2xl font-black">DRINK'UP </Text>
<Text className="text-white text-2xl font-black">DRINK'UP </Text>
<Image className="w-12 h-12 left-20 bottom-10 bg-white rounded-xl " source={require("../assets/Icon-83.5_2x-removebg-preview.png")}/>
</View>
{/* GIF */}
Expand Down

0 comments on commit 631c469

Please sign in to comment.