-
-
-
Prosody
+
+
+
+ Master Languages with Sorlang
+
+
+ Boost your language learning with our scientifically proven spaced repetition system. Track progress, analyze text, and learn efficiently.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🇹ðŸ‡
+
+
+ 🇨🇳
+
+
+ 🇯🇵
+
+
+ 🇬🇧
+
+
+
+ SRS
+
+
+ Spaced Repetition System
+
+
+
+
-
- {/* Desktop Navigation */}
-
-
- {/* Mobile Navigation */}
-
-
- Your Languages
-
-
-
-
+
+
+ {/* Feature highlights */}
+
+
+
+
Learning Features
+
+ Tools designed to accelerate your language learning journey
+
+
+
+
+
+
+
+
+
+ Spaced Repetition
+
+ Optimized review schedule based on your performance
+
+
+
+
+ Our SRS algorithm determines the optimal time for you to review each card, helping you memorize efficiently.
+
+
+
+
+
+
+
+
+
+ Text Analysis
+
+ Break down complex text into manageable pieces
+
+
+
+
+ Parse any text to analyze grammar, vocabulary, and patterns to enhance your understanding.
+
+
+
+
+
+
+
+
+
+ Progress Tracking
+
+ Monitor your learning journey with detailed statistics
+
+
+
+
+ Track your progress across different languages, see your mastery level, and identify areas for improvement.
+
+
+
+
+
+
+
+ {/* Languages section */}
+
+
+
+
Your Languages
+ {totalDueCards > 0 && (
+
+ {totalDueCards} cards due for review
+
+ )}
+
+
+
+ {Object.entries(langs).map(([langCode, langData]) => (
+
+ ))}
+
+
+
+
+
+
+
+
);
}
-const getData = async () => {
- const data = {
- title: "Waku",
- headline: "Waku",
- body: "Hello world!",
- };
-
- return data;
-};
-
export const getConfig = async () => {
return {
render: "dynamic",
} as const;
};
-async function LanguageItem({ lang }: { lang: LanguageChoice }) {
+function LanguageItem({ lang, langData }: { lang: LanguageChoice, langData: LangMeta }) {
return (
-
-
-
-
{langs[lang].flag}
-
{langs[lang].name}
+
+
+
+
+
{langData.flag}
+
+ {langData.name}
+ {langData.level}
+
+
+ {langData.dueCards > 0 && (
+
+ {langData.dueCards} due
+
+ )}
-
-
-
+
+
+
+
+
+ {langData.progress}% complete
+ {langData.totalCards} cards
+
+
+
+
+
+
+
);
}
diff --git a/src/pages/logout.tsx b/src/pages/logout.tsx
new file mode 100644
index 0000000..880d175
--- /dev/null
+++ b/src/pages/logout.tsx
@@ -0,0 +1,49 @@
+import { getContextData } from "waku/middleware/context";
+import { useCookies } from "@/lib/server/cookiebridge";
+import { Button } from "@/components/ui/button";
+import { Card } from "@/components/ui/card";
+import Navbar from "@/components/Navbar";
+
+export default async function LogoutPage() {
+ const { user } = getContextData() as any;
+ const loggedIn = !!user;
+
+ // If the user is logged in, delete the cookie
+ if (loggedIn) {
+ const { delCookie } = useCookies();
+ delCookie("sorlang");
+ }
+
+ return (
+
+
+
+
+
+
+ {loggedIn ? "You've been logged out" : "Already logged out"}
+
+
+ {loggedIn
+ ? "Your session has been ended successfully. Thank you for using Sorlang."
+ : "You were not logged in."}
+
+
+
+
+
+ );
+}
+
+export const getConfig = async () => {
+ return {
+ render: "dynamic",
+ } as const;
+};
\ No newline at end of file
--
cgit v1.2.3