- {name}
+
+ {name}
{word_count} word(s)
diff --git a/src/components/ExpressionSetInfo/ExpressionSetInfo.tsx b/src/components/ExpressionSetInfo/ExpressionSetInfo.tsx
new file mode 100644
index 0000000..2603d36
--- /dev/null
+++ b/src/components/ExpressionSetInfo/ExpressionSetInfo.tsx
@@ -0,0 +1,46 @@
+import Image from "next/image";
+import Link from "next/link";
+
+export interface ExpressionSetInfo {
+ id: number;
+ name: string;
+ description: string;
+ word_count: number;
+}
+
+export function ExpressionSetInfo({
+ id,
+ name,
+ description,
+ word_count,
+}: ExpressionSetInfo) {
+ return (
+
+
+ {name}
+
+
+
+
+
+
+
+ {word_count} word(s)
+
+ {description}
+
+ );
+}
diff --git a/src/components/ExpressionSetInfo/index.ts b/src/components/ExpressionSetInfo/index.ts
new file mode 100644
index 0000000..be1bd29
--- /dev/null
+++ b/src/components/ExpressionSetInfo/index.ts
@@ -0,0 +1 @@
+export * from "./ExpressionSetInfo";
diff --git a/src/components/Navigation/NavigationItem.tsx b/src/components/Navigation/NavigationItem.tsx
index cc8cb78..07c4593 100644
--- a/src/components/Navigation/NavigationItem.tsx
+++ b/src/components/Navigation/NavigationItem.tsx
@@ -6,12 +6,15 @@ import { UrlObject } from "url";
export interface NavigationItemProps {
text: string;
iconUrl?: string;
- href: string | UrlObject;
+ href: string;
}
export function NavigationItem({ text, iconUrl, href }: NavigationItemProps) {
const router = useRouter();
- const active = router.pathname === href;
+
+ let active = false;
+ if (href === "/" && router.pathname === "/") active = true;
+ if (href !== "/" && router.pathname.startsWith(href)) active = true;
return (
+ {name}
+
+
+
+
+
+
+
+ {word_count} word(s)
+
+ {description}
+Expression set not found
++ No expressions left in this set. +
+