diff --git a/package.json b/package.json
index 45b828ba..c1eba8c3 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,6 @@
"@radix-ui/react-direction": "^1.0.1",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-hover-card": "^1.0.7",
- "@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-navigation-menu": "^1.1.4",
"@radix-ui/react-popover": "^1.0.7",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2710b55c..25ca81ef 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -62,9 +62,6 @@ importers:
'@radix-ui/react-hover-card':
specifier: ^1.0.7
version: 1.0.7(@types/react-dom@18.2.19)(@types/react@18.2.57)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
- '@radix-ui/react-icons':
- specifier: ^1.3.0
- version: 1.3.0(react@18.2.0)
'@radix-ui/react-label':
specifier: ^2.0.2
version: 2.0.2(@types/react-dom@18.2.19)(@types/react@18.2.57)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
@@ -1949,11 +1946,6 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/react-icons@1.3.0':
- resolution: {integrity: sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw==}
- peerDependencies:
- react: ^16.x || ^17.x || ^18.x
-
'@radix-ui/react-id@1.0.0':
resolution: {integrity: sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==}
peerDependencies:
@@ -8745,10 +8737,6 @@ snapshots:
'@types/react': 18.2.57
'@types/react-dom': 18.2.19
- '@radix-ui/react-icons@1.3.0(react@18.2.0)':
- dependencies:
- react: 18.2.0
-
'@radix-ui/react-id@1.0.0(react@18.2.0)':
dependencies:
'@babel/runtime': 7.24.5
diff --git a/src/app/[locale]/t/[bookId]/layout.tsx b/src/app/[locale]/t/[bookId]/layout.tsx
index c23f2119..e42b4e47 100644
--- a/src/app/[locale]/t/[bookId]/layout.tsx
+++ b/src/app/[locale]/t/[bookId]/layout.tsx
@@ -1,9 +1,25 @@
import Providers from "./providers";
+import { cn } from "@/lib/utils";
+import { Scheherazade_New } from "next/font/google";
+
+const scheherazade = Scheherazade_New({
+ subsets: ["arabic"],
+ style: "normal",
+ variable: "--font-scheherazade",
+ weight: ["400", "700"],
+});
function ReaderLayout({ children }: { children: React.ReactNode }) {
return (
- {children}
+
+ {children}
+
);
}
diff --git a/src/app/_components/navbar/index.tsx b/src/app/_components/navbar/index.tsx
index 050c73b8..419d2227 100644
--- a/src/app/_components/navbar/index.tsx
+++ b/src/app/_components/navbar/index.tsx
@@ -13,15 +13,26 @@ import {
import React, { useEffect, useState } from "react";
import { ThemeToggle } from "./theme-toggle";
-import SearchBar from "./search-bar";
import { useNavbarStore } from "@/stores/navbar";
import { useReaderScroller } from "../../[locale]/t/[bookId]/_components/context";
-import HomepageNavigationMenu from "./navigation-menu";
+
+// import HomepageNavigationMenu from "./navigation-menu";
+// import SearchBar from "./search-bar";
+
+const SearchBar = dynamic(() => import("./search-bar"), {
+ ssr: false,
+});
+
+const HomepageNavigationMenu = dynamic(() => import("./navigation-menu"), {
+ ssr: false,
+});
+
import LocaleSwitcher from "./locale-switcher";
import MobileMenu from "./mobile-menu";
import MobileNavigationMenu from "./mobile-navigation-menu";
import { useTranslations } from "next-intl";
import { useDirection } from "@/lib/locale/utils";
+import dynamic from "next/dynamic";
interface NavbarProps {
layout?: "home" | "reader";
diff --git a/src/components/ui/accordion/index.tsx b/src/components/ui/accordion/index.tsx
index 8dcf9b6f..cb887572 100644
--- a/src/components/ui/accordion/index.tsx
+++ b/src/components/ui/accordion/index.tsx
@@ -1,12 +1,12 @@
-"use client"
+"use client";
-import * as React from "react"
-import * as AccordionPrimitive from "@radix-ui/react-accordion"
-import { ChevronDownIcon } from "@radix-ui/react-icons"
+import * as React from "react";
+import * as AccordionPrimitive from "@radix-ui/react-accordion";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
+import { ChevronDownIcon } from "lucide-react";
-const Accordion = AccordionPrimitive.Root
+const Accordion = AccordionPrimitive.Root;
const AccordionItem = React.forwardRef<
React.ElementRef,
@@ -17,8 +17,8 @@ const AccordionItem = React.forwardRef<
className={cn("border-b", className)}
{...props}
/>
-))
-AccordionItem.displayName = "AccordionItem"
+));
+AccordionItem.displayName = "AccordionItem";
const AccordionTrigger = React.forwardRef<
React.ElementRef,
@@ -29,7 +29,7 @@ const AccordionTrigger = React.forwardRef<
ref={ref}
className={cn(
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
- className
+ className,
)}
{...props}
>
@@ -37,8 +37,8 @@ const AccordionTrigger = React.forwardRef<
-))
-AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
+));
+AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
const AccordionContent = React.forwardRef<
React.ElementRef,
@@ -51,7 +51,7 @@ const AccordionContent = React.forwardRef<
>
{children}
-))
-AccordionContent.displayName = AccordionPrimitive.Content.displayName
+));
+AccordionContent.displayName = AccordionPrimitive.Content.displayName;
-export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
+export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
diff --git a/src/components/ui/command/index.tsx b/src/components/ui/command/index.tsx
index 9d01024a..1e131e04 100644
--- a/src/components/ui/command/index.tsx
+++ b/src/components/ui/command/index.tsx
@@ -2,12 +2,12 @@
import * as React from "react";
import { type DialogProps } from "@radix-ui/react-dialog";
-import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
import { Command as CommandPrimitive } from "cmdk";
import { cn } from "@/lib/utils";
import { Dialog, DialogContent } from "@/components/ui/dialog";
import Spinner from "../spinner";
+import { SearchIcon } from "lucide-react";
const Command = React.forwardRef<
React.ElementRef,
@@ -53,7 +53,7 @@ const CommandInput = React.forwardRef<
{isLoading ? (
) : (
-
+
)}
{children}
-
+
Close
diff --git a/src/components/ui/dropdown-menu/index.tsx b/src/components/ui/dropdown-menu/index.tsx
index e7129cd0..7ac72e6c 100644
--- a/src/components/ui/dropdown-menu/index.tsx
+++ b/src/components/ui/dropdown-menu/index.tsx
@@ -2,13 +2,9 @@
import * as React from "react";
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
-import {
- CheckIcon,
- ChevronRightIcon,
- DotFilledIcon,
-} from "@radix-ui/react-icons";
import { cn } from "@/lib/utils";
+import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
const DropdownMenu = DropdownMenuPrimitive.Root;
@@ -135,7 +131,7 @@ const DropdownMenuRadioItem = React.forwardRef<
>
-
+
{children}
diff --git a/src/components/ui/navigation-menu.tsx b/src/components/ui/navigation-menu.tsx
index 96c1423f..d41b2e4a 100644
--- a/src/components/ui/navigation-menu.tsx
+++ b/src/components/ui/navigation-menu.tsx
@@ -1,9 +1,9 @@
import * as React from "react";
-import { ChevronDownIcon } from "@radix-ui/react-icons";
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
import { cva } from "class-variance-authority";
import { cn } from "@/lib/utils";
+import { ChevronDownIcon } from "lucide-react";
const NavigationMenu = React.forwardRef<
React.ElementRef,
diff --git a/src/components/ui/resizable/index.tsx b/src/components/ui/resizable/index.tsx
index 1431b553..9eee4d77 100644
--- a/src/components/ui/resizable/index.tsx
+++ b/src/components/ui/resizable/index.tsx
@@ -1,9 +1,9 @@
"use client";
-import { DragHandleDots2Icon } from "@radix-ui/react-icons";
import * as ResizablePrimitive from "react-resizable-panels";
import { cn } from "@/lib/utils";
+import { GripVerticalIcon } from "lucide-react";
const ResizablePanelGroup = ({
className,
@@ -36,7 +36,7 @@ const ResizableHandle = ({
>
{withHandle && (
-
+
)}
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx
index c7b21314..66cf975a 100644
--- a/src/components/ui/select/index.tsx
+++ b/src/components/ui/select/index.tsx
@@ -1,16 +1,17 @@
"use client";
import * as React from "react";
-import {
- CaretSortIcon,
- CheckIcon,
- ChevronDownIcon,
- ChevronUpIcon,
-} from "@radix-ui/react-icons";
+
import * as SelectPrimitive from "@radix-ui/react-select";
import { cn } from "@/lib/utils";
import Spinner from "../spinner";
+import {
+ CheckIcon,
+ ChevronDownIcon,
+ ChevronUpIcon,
+ ChevronsUpDownIcon,
+} from "lucide-react";
const Select = SelectPrimitive.Root;
@@ -54,7 +55,7 @@ const SelectTrigger = React.forwardRef<
{isLoading ? (
) : (
- icon ??
+ icon ??
)}
diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx
index 0a79240a..9e2a2a4d 100644
--- a/src/components/ui/sheet.tsx
+++ b/src/components/ui/sheet.tsx
@@ -2,10 +2,10 @@
import * as React from "react";
import * as SheetPrimitive from "@radix-ui/react-dialog";
-import { Cross2Icon } from "@radix-ui/react-icons";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
+import { XIcon } from "lucide-react";
const Sheet = SheetPrimitive.Root;
@@ -66,7 +66,7 @@ const SheetContent = React.forwardRef<
>
{children}
-
+
Close
diff --git a/src/components/ui/toast.tsx b/src/components/ui/toast.tsx
index 468a6b93..18e3a5f8 100644
--- a/src/components/ui/toast.tsx
+++ b/src/components/ui/toast.tsx
@@ -1,11 +1,11 @@
"use client";
import * as React from "react";
-import { Cross2Icon } from "@radix-ui/react-icons";
import * as ToastPrimitives from "@radix-ui/react-toast";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
+import { XIcon } from "lucide-react";
const ToastProvider = ToastPrimitives.Provider;
@@ -86,7 +86,7 @@ const ToastClose = React.forwardRef<
toast-close=""
{...props}
>
-
+
));
ToastClose.displayName = ToastPrimitives.Close.displayName;
diff --git a/src/lib/fonts.ts b/src/lib/fonts.ts
index c7cb88ad..dcff19d1 100644
--- a/src/lib/fonts.ts
+++ b/src/lib/fonts.ts
@@ -1,13 +1,6 @@
-import { Plus_Jakarta_Sans, Scheherazade_New } from "next/font/google";
+import { Plus_Jakarta_Sans } from "next/font/google";
import localFont from "next/font/local";
-const scheherazade = Scheherazade_New({
- subsets: ["arabic"],
- style: "normal",
- variable: "--font-scheherazade",
- weight: ["400", "700"],
-});
-
const plusJakartaSans = Plus_Jakarta_Sans({
subsets: ["latin"],
style: "normal",
@@ -78,9 +71,4 @@ const ibmPlexSansArabic = localFont({
// });
export const getFontsClassnames = () =>
- [
- plusJakartaSans.variable,
- ibmPlexSansArabic.variable,
- scheherazade.variable,
- // uthmanicHafs.variable,
- ].join(" ");
+ [plusJakartaSans.variable, ibmPlexSansArabic.variable].join(" ");