diff --git a/.vs/LEARNIHON/FileContentIndex/18ab66a5-4a11-4328-bc91-cd3376b0ec91.vsidx b/.vs/LEARNIHON/FileContentIndex/18ab66a5-4a11-4328-bc91-cd3376b0ec91.vsidx new file mode 100644 index 0000000..049725d Binary files /dev/null and b/.vs/LEARNIHON/FileContentIndex/18ab66a5-4a11-4328-bc91-cd3376b0ec91.vsidx differ diff --git a/.vs/LEARNIHON/FileContentIndex/258f16dc-1fae-46bb-a37e-067ba22b8aa6.vsidx b/.vs/LEARNIHON/FileContentIndex/435d2972-bbd4-45e0-8354-cf69c2c152c7.vsidx similarity index 53% rename from .vs/LEARNIHON/FileContentIndex/258f16dc-1fae-46bb-a37e-067ba22b8aa6.vsidx rename to .vs/LEARNIHON/FileContentIndex/435d2972-bbd4-45e0-8354-cf69c2c152c7.vsidx index 44a42bc..5150a6d 100644 Binary files a/.vs/LEARNIHON/FileContentIndex/258f16dc-1fae-46bb-a37e-067ba22b8aa6.vsidx and b/.vs/LEARNIHON/FileContentIndex/435d2972-bbd4-45e0-8354-cf69c2c152c7.vsidx differ diff --git a/.vs/LEARNIHON/FileContentIndex/a731465e-eb3c-499c-8b0d-31f641e360d5.vsidx b/.vs/LEARNIHON/FileContentIndex/a731465e-eb3c-499c-8b0d-31f641e360d5.vsidx new file mode 100644 index 0000000..4954627 Binary files /dev/null and b/.vs/LEARNIHON/FileContentIndex/a731465e-eb3c-499c-8b0d-31f641e360d5.vsidx differ diff --git a/.vs/LEARNIHON/FileContentIndex/a7dd2f40-abf0-45ad-9ffc-b68af86427ae.vsidx b/.vs/LEARNIHON/FileContentIndex/a7dd2f40-abf0-45ad-9ffc-b68af86427ae.vsidx deleted file mode 100644 index 07329bf..0000000 Binary files a/.vs/LEARNIHON/FileContentIndex/a7dd2f40-abf0-45ad-9ffc-b68af86427ae.vsidx and /dev/null differ diff --git a/.vs/LEARNIHON/FileContentIndex/d5ec9cbe-63e1-4a04-aad4-7e43aeb6e545.vsidx b/.vs/LEARNIHON/FileContentIndex/d5ec9cbe-63e1-4a04-aad4-7e43aeb6e545.vsidx deleted file mode 100644 index 911a013..0000000 Binary files a/.vs/LEARNIHON/FileContentIndex/d5ec9cbe-63e1-4a04-aad4-7e43aeb6e545.vsidx and /dev/null differ diff --git a/.vs/LEARNIHON/v17/.wsuo b/.vs/LEARNIHON/v17/.wsuo index 9781c68..2f2f413 100644 Binary files a/.vs/LEARNIHON/v17/.wsuo and b/.vs/LEARNIHON/v17/.wsuo differ diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index db14d0e..1048f14 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -1,7 +1,13 @@ { "ExpandedNodes": [ - "" + "", + "\\assets", + "\\components", + "\\model", + "\\navigation", + "\\pages", + "\\redux" ], - "SelectedNode": "\\C:\\Users\\Siph9\\Source\\Repos\\LEARNIHON", + "SelectedNode": "\\components\\KanjiListCell.tsx", "PreviewInSolutionExplorer": false } \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index fe38e26..feede14 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/assets/answerAnimation.ts b/assets/answerAnimation.ts index b6189f9..a1dc765 100644 --- a/assets/answerAnimation.ts +++ b/assets/answerAnimation.ts @@ -23,7 +23,7 @@ export const animatedStyles = { { translateY: animation.interpolate({ inputRange: [0, 1], - outputRange: [0, -Dimensions.get('window').height / 1.9] + outputRange: [0, -Dimensions.get('window').height / 2] }), }, ], diff --git a/components/DetailExamples.tsx b/components/DetailExamples.tsx new file mode 100644 index 0000000..a923f99 --- /dev/null +++ b/components/DetailExamples.tsx @@ -0,0 +1,67 @@ +import React from 'react'; +import { FlatList, StyleSheet, Text, useColorScheme, View } from 'react-native'; + + + +interface detailExamplesProps { + data: { japanese: string, english: string }[] +} + +const DetailExamples = (props: detailExamplesProps) => { + + const detailExamplesStyle = useColorScheme() == 'light' ? detailExamplesStyle_light : detailExamplesStyle_dark; + + return ( + + item.japanese + item.english} + renderItem={ + ({ item }) => + true}> + {item.japanese} + {item.english} + + }> + + + ); +}; + +const detailExamplesStyle_light = StyleSheet.create({ + container: { + width: '100%', + paddingBottom: 50, + }, + cellContainer: { + flex: 1, + flexDirection: "row" + }, + textJapanese: { + width: "50%" + }, + textEnglish: { + textAlign: "right", + width: "50%" + } +}) + +const detailExamplesStyle_dark = StyleSheet.create({ + container: { + width: '100%', + paddingBottom: 50, + }, + cellContainer: { + flex: 1, + flexDirection: "row" + }, + textJapanese: { + width: "50%", + color: "white" + }, + textEnglish: { + textAlign: "right", + width: "50%", + color: "white" + } +}) + +export default DetailExamples; \ No newline at end of file diff --git a/components/DetailRadical.tsx b/components/DetailRadical.tsx new file mode 100644 index 0000000..dd2aa3b --- /dev/null +++ b/components/DetailRadical.tsx @@ -0,0 +1,73 @@ +import React from 'react'; +import { StyleSheet, Text, useColorScheme, View } from 'react-native'; +import { SvgXml } from 'react-native-svg'; +import { useDispatch, useSelector } from 'react-redux'; + + + +interface detailRadicalProps { + character: string, + icon: string +} + +const DetailRadical = (props: detailRadicalProps) => { + + const detailRadicalStyle = useColorScheme() == 'light' ? detailRadicalStyle_light : detailRadicalStyle_dark; + return ( + + {props.character} + + + ); +}; + +const detailRadicalStyle_light = StyleSheet.create({ + container: { + height: 30, + width: 30, + }, + svg: { + color: "#FF5C5C" + }, + radicalIcon: { + position: "absolute" + }, + radicalText: { + fontWeight: "bold", + textAlign: "center", + width: 30, + height: 30, + fontSize: 25 + }, +}) + +const detailRadicalStyle_dark = StyleSheet.create({ + container: { + height: 30, + width: 30, + }, + svg: { + color: "#FF5C5C" + }, + radicalIcon: { + position: "absolute" + }, + radicalText: { + fontWeight: "bold", + textAlign: "center", + width: 30, + height: 30, + fontSize: 25, + color: "white" + }, +}) + +export default DetailRadical; \ No newline at end of file diff --git a/components/KanjiCard.tsx b/components/KanjiCard.tsx index 7b8addd..9987701 100644 --- a/components/KanjiCard.tsx +++ b/components/KanjiCard.tsx @@ -26,13 +26,13 @@ const KanjiCard = (props: KanjiProps) => { const fetchData = async () => { await fetch(`https://kanjialive-api.p.rapidapi.com/api/public/kanji/${props.kanji}`, options) - .then(async response => { + .then(async response => { const data = await response.json() setData(data); const xml = await (await fetch(data.kanji.video.poster)).text(); setImgXml(xml); }) - .catch(err => console.log(err)); + .catch(err => console.log(err)); } useEffect(() => { @@ -44,7 +44,7 @@ const KanjiCard = (props: KanjiProps) => { return ( - + {loading ? Loading... : {res.kanji.onyomi.katakana}} {!loading && ( @@ -54,11 +54,11 @@ const KanjiCard = (props: KanjiProps) => { width="200" height="200" /> - )} - {loading ? : {res.kanji.meaning.english}} - -