diff options
Diffstat (limited to 'apps/web/components/settings')
| -rw-r--r-- | apps/web/components/settings/sidebar/ModileSidebar.tsx | 21 | ||||
| -rw-r--r-- | apps/web/components/settings/sidebar/Sidebar.tsx | 36 | ||||
| -rw-r--r-- | apps/web/components/settings/sidebar/items.tsx | 55 |
3 files changed, 0 insertions, 112 deletions
diff --git a/apps/web/components/settings/sidebar/ModileSidebar.tsx b/apps/web/components/settings/sidebar/ModileSidebar.tsx deleted file mode 100644 index cbed9ef9..00000000 --- a/apps/web/components/settings/sidebar/ModileSidebar.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import MobileSidebarItem from "@/components/shared/sidebar/ModileSidebarItem"; -import { useTranslation } from "@/lib/i18n/server"; - -import { settingsSidebarItems } from "./items"; - -export default async function MobileSidebar() { - const { t } = await useTranslation(); - return ( - <aside className="w-full"> - <ul className="flex justify-between space-x-2 border-b-black px-5 py-2 pt-5"> - {settingsSidebarItems(t).map((item) => ( - <MobileSidebarItem - key={item.name} - logo={item.icon} - path={item.path} - /> - ))} - </ul> - </aside> - ); -} diff --git a/apps/web/components/settings/sidebar/Sidebar.tsx b/apps/web/components/settings/sidebar/Sidebar.tsx deleted file mode 100644 index a1b61e98..00000000 --- a/apps/web/components/settings/sidebar/Sidebar.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { redirect } from "next/navigation"; -import SidebarItem from "@/components/shared/sidebar/SidebarItem"; -import { useTranslation } from "@/lib/i18n/server"; -import { getServerAuthSession } from "@/server/auth"; - -import serverConfig from "@hoarder/shared/config"; - -import { settingsSidebarItems } from "./items"; - -export default async function Sidebar() { - const { t } = await useTranslation(); - const session = await getServerAuthSession(); - if (!session) { - redirect("/"); - } - - return ( - <aside className="flex h-[calc(100vh-64px)] w-60 flex-col gap-5 border-r p-4 "> - <div> - <ul className="space-y-2 text-sm font-medium"> - {settingsSidebarItems(t).map((item) => ( - <SidebarItem - key={item.name} - logo={item.icon} - name={item.name} - path={item.path} - /> - ))} - </ul> - </div> - <div className="mt-auto flex items-center border-t pt-2 text-sm text-gray-400"> - Hoarder v{serverConfig.serverVersion} - </div> - </aside> - ); -} diff --git a/apps/web/components/settings/sidebar/items.tsx b/apps/web/components/settings/sidebar/items.tsx deleted file mode 100644 index f76d494a..00000000 --- a/apps/web/components/settings/sidebar/items.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import React from "react"; -import { TFunction } from "i18next"; -import { - ArrowLeft, - Download, - KeyRound, - Link, - Rss, - Sparkles, - User, -} from "lucide-react"; - -export const settingsSidebarItems = ( - t: TFunction, -): { - name: string; - icon: JSX.Element; - path: string; -}[] => [ - { - name: t("settings.back_to_app"), - icon: <ArrowLeft size={18} />, - path: "/dashboard/bookmarks", - }, - { - name: t("settings.info.user_info"), - icon: <User size={18} />, - path: "/settings/info", - }, - { - name: t("settings.ai.ai_settings"), - icon: <Sparkles size={18} />, - path: "/settings/ai", - }, - { - name: t("settings.feeds.rss_subscriptions"), - icon: <Rss size={18} />, - path: "/settings/feeds", - }, - { - name: t("settings.import.import_export"), - icon: <Download size={18} />, - path: "/settings/import", - }, - { - name: t("settings.api_keys.api_keys"), - icon: <KeyRound size={18} />, - path: "/settings/api-keys", - }, - { - name: t("settings.broken_links.broken_links"), - icon: <Link size={18} />, - path: "/settings/broken-links", - }, -]; |
