Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(core) feat(endscreen): fixed button display #6

Merged
merged 1 commit into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@

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

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
Loading