diff --git a/src/App.tsx b/src/App.tsx index d53ee58..6b61716 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,6 @@ import { SafeAreaView } from 'react-native' -import {StyleSheet, Text, View, FlatList, Image} from 'react-native'; +import {StyleSheet} from 'react-native'; import NavigationBar from "./navigation/NavigationBar"; -import Catalogue from "./screens/Catalogue"; import {indigoColor} from "./assets/Theme"; export default function App() { diff --git a/src/components/Categ.tsx b/src/components/Categ.tsx index 8f4b0af..c364d50 100644 --- a/src/components/Categ.tsx +++ b/src/components/Categ.tsx @@ -1,4 +1,4 @@ -import {StyleSheet, Text, View, FlatList, Image} from 'react-native'; +import {StyleSheet, Text, View} from 'react-native'; import {SampleJoke} from "../model/SampleJoke"; import {CustomJoke} from "../model/CustomJoke"; import {greyColor} from "../assets/Theme"; diff --git a/src/components/CategList.tsx b/src/components/Categs.tsx similarity index 90% rename from src/components/CategList.tsx rename to src/components/Categs.tsx index 876e73e..369e811 100644 --- a/src/components/CategList.tsx +++ b/src/components/Categs.tsx @@ -7,7 +7,7 @@ type JokeListItemProps = { jokes: (CustomJoke | SampleJoke)[]; }; -export default function CategList(props: JokeListItemProps) { +export default function Categs(props: JokeListItemProps) { return ( Résumé de la blague {prop.joke.description()} - - {prop.joke.type} - + ); diff --git a/src/components/JokeListItem.tsx b/src/components/JokeItems.tsx similarity index 89% rename from src/components/JokeListItem.tsx rename to src/components/JokeItems.tsx index d9ed5ce..d25306c 100644 --- a/src/components/JokeListItem.tsx +++ b/src/components/JokeItems.tsx @@ -7,7 +7,7 @@ type JokeListItemProps = { jokes: (CustomJoke | SampleJoke)[]; }; -export default function JokeListItem(props: JokeListItemProps) { +export default function JokeItems(props: JokeListItemProps) { return ( - - - - - - - ) -} \ No newline at end of file +// import {createStackNavigator} from "@react-navigation/stack"; +// import Accueil from "../screens/HomeScreen"; +// import Catalogue from "../screens/Catalogue"; +// import Add from "../screens/AddScreen"; +// import Favorites from "../screens/Favorites"; +// import Settings from "../screens/Settings"; +// +// +// export default function StackNavigation() { +// const Stack = createStackNavigator(); +// return ( +// +// +// +// +// +// +// +// ) +// } \ No newline at end of file diff --git a/src/screens/AddScreen.tsx b/src/screens/AddScreen.tsx index 8b65ba0..66e2488 100644 --- a/src/screens/AddScreen.tsx +++ b/src/screens/AddScreen.tsx @@ -1,41 +1,11 @@ -import { StatusBar } from 'expo-status-bar'; -import { StyleSheet, Text, View } from 'react-native'; import { customJokeStub } from '../data/stub/CustomJokeStub'; import { sampleJokeStub } from '../data/stub/SampleJokeStub'; -import { SafeAreaView } from 'react-native' -import JokeListItem from "../components/JokeListItem"; +import JokeItems from "../components/JokeItems"; import '../types/extension'; -import {darksalmonColor, indigoColor, purpleColor} from "../assets/Theme"; export default function Catalogue() { const allJokes = [...customJokeStub, ...sampleJokeStub]; return ( - <> - - - - - - + ) -}; - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: purpleColor, - }, - centered: { - color:darksalmonColor, - fontSize:24, - textAlign: "center", - paddingBottom:20, - }, - title: { - backgroundColor: indigoColor - }, - topSafeArea: { - flex: 0, - backgroundColor: indigoColor - } -}); \ No newline at end of file +}; \ No newline at end of file diff --git a/src/screens/Catalogue.tsx b/src/screens/Catalogue.tsx index 97dc15f..66e2488 100644 --- a/src/screens/Catalogue.tsx +++ b/src/screens/Catalogue.tsx @@ -1,39 +1,11 @@ -import { StatusBar } from 'expo-status-bar'; -import { StyleSheet, Text, View } from 'react-native'; import { customJokeStub } from '../data/stub/CustomJokeStub'; import { sampleJokeStub } from '../data/stub/SampleJokeStub'; -import { SafeAreaView } from 'react-native' -import JokeListItem from "../components/JokeListItem"; +import JokeItems from "../components/JokeItems"; import '../types/extension'; -import {darksalmonColor, indigoColor, purpleColor} from "../assets/Theme"; export default function Catalogue() { const allJokes = [...customJokeStub, ...sampleJokeStub]; -return ( - <> - - - - -) -}; - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: purpleColor, - }, - centered: { - color:darksalmonColor, - fontSize:24, - textAlign: "center", - paddingBottom:20, - }, - title: { - backgroundColor: indigoColor - }, - topSafeArea: { - flex: 0, - backgroundColor: indigoColor - } -}); \ No newline at end of file + return ( + + ) +}; \ No newline at end of file diff --git a/src/screens/Favorites.tsx b/src/screens/Favorites.tsx index 8b65ba0..66e2488 100644 --- a/src/screens/Favorites.tsx +++ b/src/screens/Favorites.tsx @@ -1,41 +1,11 @@ -import { StatusBar } from 'expo-status-bar'; -import { StyleSheet, Text, View } from 'react-native'; import { customJokeStub } from '../data/stub/CustomJokeStub'; import { sampleJokeStub } from '../data/stub/SampleJokeStub'; -import { SafeAreaView } from 'react-native' -import JokeListItem from "../components/JokeListItem"; +import JokeItems from "../components/JokeItems"; import '../types/extension'; -import {darksalmonColor, indigoColor, purpleColor} from "../assets/Theme"; export default function Catalogue() { const allJokes = [...customJokeStub, ...sampleJokeStub]; return ( - <> - - - - - - + ) -}; - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: purpleColor, - }, - centered: { - color:darksalmonColor, - fontSize:24, - textAlign: "center", - paddingBottom:20, - }, - title: { - backgroundColor: indigoColor - }, - topSafeArea: { - flex: 0, - backgroundColor: indigoColor - } -}); \ No newline at end of file +}; \ No newline at end of file diff --git a/src/screens/HomeScreen.tsx b/src/screens/HomeScreen.tsx index 9073554..efb1cab 100644 --- a/src/screens/HomeScreen.tsx +++ b/src/screens/HomeScreen.tsx @@ -1,15 +1,10 @@ -import { StatusBar } from 'expo-status-bar'; -import {FlatList, Image, StyleSheet, Text, View} from 'react-native'; +import {Image, StyleSheet, Text, View} from 'react-native'; import { customJokeStub } from '../data/stub/CustomJokeStub'; import { sampleJokeStub } from '../data/stub/SampleJokeStub'; -import { SafeAreaView } from 'react-native' -import JokeListItem from "../components/JokeListItem"; import '../types/extension'; -import {darksalmonColor, indigoColor, purpleColor, whiteColor} from "../assets/Theme"; -import JokeListHomeSquare from "../components/JokeListHomeSquare"; -import CategList from "../components/CategList"; -import {CustomJoke} from "../model/CustomJoke"; -import {SampleJoke} from "../model/SampleJoke"; +import {darksalmonColor, purpleColor, whiteColor} from "../assets/Theme"; +import JokesHomeSquare from "../components/JokesHomeSquare"; +import Categs from "../components/Categs"; export default function Catalogue() { const allJokes = [...customJokeStub, ...sampleJokeStub]; @@ -22,7 +17,7 @@ export default function Catalogue() { Dernières blagues - + @@ -30,7 +25,7 @@ export default function Catalogue() { - + diff --git a/src/screens/Settings.tsx b/src/screens/Settings.tsx index 8b65ba0..66e2488 100644 --- a/src/screens/Settings.tsx +++ b/src/screens/Settings.tsx @@ -1,41 +1,11 @@ -import { StatusBar } from 'expo-status-bar'; -import { StyleSheet, Text, View } from 'react-native'; import { customJokeStub } from '../data/stub/CustomJokeStub'; import { sampleJokeStub } from '../data/stub/SampleJokeStub'; -import { SafeAreaView } from 'react-native' -import JokeListItem from "../components/JokeListItem"; +import JokeItems from "../components/JokeItems"; import '../types/extension'; -import {darksalmonColor, indigoColor, purpleColor} from "../assets/Theme"; export default function Catalogue() { const allJokes = [...customJokeStub, ...sampleJokeStub]; return ( - <> - - - - - - + ) -}; - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: purpleColor, - }, - centered: { - color:darksalmonColor, - fontSize:24, - textAlign: "center", - paddingBottom:20, - }, - title: { - backgroundColor: indigoColor - }, - topSafeArea: { - flex: 0, - backgroundColor: indigoColor - } -}); \ No newline at end of file +}; \ No newline at end of file