+
);
};
diff --git a/nepalingo-web/src/hooks/useQuotes.tsx b/nepalingo-web/src/hooks/useQuotes.tsx
index 2bb11b1..82e51ec 100644
--- a/nepalingo-web/src/hooks/useQuotes.tsx
+++ b/nepalingo-web/src/hooks/useQuotes.tsx
@@ -46,7 +46,9 @@ const useQuotes = (): QuotesResponse => {
};
});
- const randomIndex = Math.floor(Math.random() * quotesArray.length);
+ // We do quotesArray.length - 1 because the last element of the array is always empty
+ // due to the way the csv is being parsed above.
+ const randomIndex = Math.floor(Math.random() * (quotesArray.length - 1));
const randomQuote = quotesArray[randomIndex];
setQuotes(quotesArray);
diff --git a/nepalingo-web/src/components/header/About.tsx b/nepalingo-web/src/pages/About.tsx
similarity index 100%
rename from nepalingo-web/src/components/header/About.tsx
rename to nepalingo-web/src/pages/About.tsx
diff --git a/nepalingo-web/src/pages/Credits.tsx b/nepalingo-web/src/pages/Credits.tsx
new file mode 100644
index 0000000..a9d3049
--- /dev/null
+++ b/nepalingo-web/src/pages/Credits.tsx
@@ -0,0 +1,51 @@
+import React from "react";
+import Header from "@/components/header/Header";
+
+const Credits: React.FC = () => {
+ return (
+ <>
+
+
+
Data Sources:
+
+ NepalBhasa.org
+
+
+
+ NepalBhasa.org
+
+ is an online Newari Dictionary which managed by Daibuli, a
+ US-based nonprofit organization who have kindly provided us with their
+ backend API allowing us to retrieve more detailed data like images,
+ audio, parts of speech and more.
+
+
+
+ Google Translate
+
+
+ Google Translate API is used to power some of the more popular
+ languages in Nepal including but not limited to Sanskrit, Nepali, and
+ Maithli.
+
+
+
+ Individual Contributers
+
+
+ Puja Tajpuriya has been a major contributer to all the Tajpuriya
+ translations.
+ We are looking for linguists! If you'd like to contribute to this
+ project, please reach us via email: support at nepalingo dot com
+
+
+ >
+ );
+};
+
+export default Credits;
diff --git a/nepalingo-web/src/pages/Home.tsx b/nepalingo-web/src/pages/Home.tsx
index fea750a..5c9a801 100644
--- a/nepalingo-web/src/pages/Home.tsx
+++ b/nepalingo-web/src/pages/Home.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React from "react";
import { useNavigate } from "react-router-dom";
import ReactGA from "react-ga4";
import { useAuth } from "@/hooks/Auth";
@@ -7,7 +7,6 @@ import GreetingCard from "@/components/GreetingCard";
import ActivityCard from "@/components/ActivityCard";
import { useLanguage } from "@/hooks/Langauge";
import StreakDisplay from "@/components/header/StreakDisplay";
-import FeedbackForm from "@/components/FeedbackForm";
import RandomQuoteComponent from "@/components/randomQuotes";
const Home: React.FC = () => {
@@ -19,16 +18,6 @@ const Home: React.FC = () => {
const navigate = useNavigate();
const { user } = useAuth();
const { selectedLanguage } = useLanguage();
- const [isFeedbackFormOpen, setIsFeedbackFormOpen] = useState(false);
-
- const handleOpenFeedbackForm = () => {
- setIsFeedbackFormOpen(true);
- };
-
- const handleCloseFeedbackForm = () => {
- setIsFeedbackFormOpen(false);
- };
-
return (
<>
@@ -38,13 +27,33 @@ const Home: React.FC = () => {
+
+
+
+
+
{
+ navigate("/quiz");
+ }}
+ />
+
+
{
navigate("/flashcard");
}}
@@ -53,7 +62,7 @@ const Home: React.FC = () => {
-
-
{
- navigate("/test-yourself");
- }}
- />
-
-
-
-
-
-
-
-
-
-
- {isFeedbackFormOpen && (
-
-
-
- )}
>
);
diff --git a/nepalingo-web/src/pages/TestYourself.tsx b/nepalingo-web/src/pages/Quiz.tsx
similarity index 98%
rename from nepalingo-web/src/pages/TestYourself.tsx
rename to nepalingo-web/src/pages/Quiz.tsx
index b610026..7c43d34 100644
--- a/nepalingo-web/src/pages/TestYourself.tsx
+++ b/nepalingo-web/src/pages/Quiz.tsx
@@ -7,7 +7,7 @@ import { useStreak } from "@/hooks/StreakContext";
import { useLanguage } from "@/hooks/Langauge";
import { getNextWord } from "@/lib/getNextWord";
-const TestYourself: React.FC = () => {
+const Quiz: React.FC = () => {
const { updateStreak } = useStreak();
const { selectedLanguage } = useLanguage();
const [word, setWord] = useState("hello");
@@ -160,4 +160,4 @@ const TestYourself: React.FC = () => {
);
};
-export default TestYourself;
+export default Quiz;