diff --git a/web/src/components/DemoBanner.tsx b/web/src/components/DemoBanner.tsx index a648ae1..366e1d3 100644 --- a/web/src/components/DemoBanner.tsx +++ b/web/src/components/DemoBanner.tsx @@ -13,7 +13,7 @@ const DemoBanner: React.FC = () => { return (
-
+
✨Slash - An open source, self-hosted bookmarks and link sharing platform { return ( <>
-
+
diff --git a/web/src/components/setting/AccountSection.tsx b/web/src/components/setting/AccountSection.tsx index 1b4e27a..fb17d01 100644 --- a/web/src/components/setting/AccountSection.tsx +++ b/web/src/components/setting/AccountSection.tsx @@ -12,7 +12,7 @@ const AccountSection: React.FC = () => { return ( <> -
+

Account

{currentUser.nickname} diff --git a/web/src/components/setting/UserSection.tsx b/web/src/components/setting/UserSection.tsx index fc11391..717d4f8 100644 --- a/web/src/components/setting/UserSection.tsx +++ b/web/src/components/setting/UserSection.tsx @@ -20,7 +20,7 @@ const MemberSection = () => { return ( <> -

+
diff --git a/web/src/components/setting/WorkspaceSection.tsx b/web/src/components/setting/WorkspaceSection.tsx index d05c4f1..c8affbd 100644 --- a/web/src/components/setting/WorkspaceSection.tsx +++ b/web/src/components/setting/WorkspaceSection.tsx @@ -17,7 +17,7 @@ const WorkspaceSection: React.FC = () => { }; return ( -
+

Workspace settings

{ return ( <> -
+

{currentUser.nickname}

Email: diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsx index 961e718..4721075 100644 --- a/web/src/pages/Home.tsx +++ b/web/src/pages/Home.tsx @@ -43,7 +43,7 @@ const Home: React.FC = () => { return ( <> -

+
diff --git a/web/src/pages/Setting.tsx b/web/src/pages/Setting.tsx index ca3bb34..265e025 100644 --- a/web/src/pages/Setting.tsx +++ b/web/src/pages/Setting.tsx @@ -8,7 +8,7 @@ const Setting: React.FC = () => { const isAdmin = currentUser.role === "ADMIN"; return ( -
+
{isAdmin && ( <> diff --git a/web/src/pages/ShortcutDetail.tsx b/web/src/pages/ShortcutDetail.tsx index 7d55ca0..ba1ed30 100644 --- a/web/src/pages/ShortcutDetail.tsx +++ b/web/src/pages/ShortcutDetail.tsx @@ -3,7 +3,7 @@ import copy from "copy-to-clipboard"; import { useEffect, useState } from "react"; import toast from "react-hot-toast"; import { useTranslation } from "react-i18next"; -import { useLoaderData } from "react-router-dom"; +import { useLoaderData, useNavigate } from "react-router-dom"; import { showCommonDialog } from "../components/Alert"; import AnalyticsDialog from "../components/AnalyticsDialog"; import Dropdown from "../components/common/Dropdown"; @@ -22,6 +22,7 @@ interface State { const ShortcutDetail = () => { const { t } = useTranslation(); + const navigate = useNavigate(); const shortcutId = (useLoaderData() as Shortcut).id; const shortcut = shortcutService.getShortcutById(shortcutId) as Shortcut; const currentUser = useUserStore().getCurrentUser(); @@ -55,13 +56,16 @@ const ShortcutDetail = () => { style: "danger", onConfirm: async () => { await shortcutService.deleteShortcutById(shortcut.id); + navigate("/", { + replace: true, + }); }, }); }; return ( <> -
+
{favicon ? (