From 6028838f03fa8a0974fe7cbc6ca30cb7903bde57 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 9 Apr 2024 20:51:09 +0800 Subject: [PATCH] chore: update component name --- web/src/components/Dialog/BaseDialog.tsx | 5 ++--- web/src/components/HomeSidebar/HomeSidebar.tsx | 4 ++-- web/src/components/MemoEditor/MemoEditorDialog.tsx | 1 - web/src/components/PreviewMarkdownDialog.tsx | 1 - .../{PersonalStatistics.tsx => UserStatisticsView.tsx} | 8 +++++--- 5 files changed, 9 insertions(+), 10 deletions(-) rename web/src/components/{PersonalStatistics.tsx => UserStatisticsView.tsx} (90%) diff --git a/web/src/components/Dialog/BaseDialog.tsx b/web/src/components/Dialog/BaseDialog.tsx index 50e13b59..e6389a59 100644 --- a/web/src/components/Dialog/BaseDialog.tsx +++ b/web/src/components/Dialog/BaseDialog.tsx @@ -12,7 +12,6 @@ import "@/less/base-dialog.less"; interface DialogConfig { dialogName: string; className?: string; - containerClassName?: string; clickSpaceDestroy?: boolean; } @@ -21,7 +20,7 @@ interface Props extends DialogConfig, DialogProps { } const BaseDialog: React.FC = (props: Props) => { - const { children, className, containerClassName, clickSpaceDestroy, dialogName, destroy } = props; + const { children, className, clickSpaceDestroy, dialogName, destroy } = props; const dialogStore = useDialogStore(); const dialogContainerRef = useRef(null); const dialogIndex = dialogStore.state.dialogStack.findIndex((item) => item === dialogName); @@ -58,7 +57,7 @@ const BaseDialog: React.FC = (props: Props) => { return (
-
e.stopPropagation()}> +
e.stopPropagation()}> {children}
diff --git a/web/src/components/HomeSidebar/HomeSidebar.tsx b/web/src/components/HomeSidebar/HomeSidebar.tsx index d6fca6fc..8c965ead 100644 --- a/web/src/components/HomeSidebar/HomeSidebar.tsx +++ b/web/src/components/HomeSidebar/HomeSidebar.tsx @@ -1,6 +1,6 @@ import classNames from "classnames"; -import PersonalStatistics from "@/components/PersonalStatistics"; import SearchBar from "@/components/SearchBar"; +import UserStatisticsView from "@/components/UserStatisticsView"; import useCurrentUser from "@/hooks/useCurrentUser"; import TagsSection from "./TagsSection"; @@ -19,7 +19,7 @@ const HomeSidebar = (props: Props) => { )} > - + ); diff --git a/web/src/components/MemoEditor/MemoEditorDialog.tsx b/web/src/components/MemoEditor/MemoEditorDialog.tsx index 47516a9a..01441828 100644 --- a/web/src/components/MemoEditor/MemoEditorDialog.tsx +++ b/web/src/components/MemoEditor/MemoEditorDialog.tsx @@ -55,7 +55,6 @@ export default function showMemoEditorDialog(props: Pick { +const UserStatisticsView = (props: Props) => { const { user } = props; const t = useTranslate(); const tagStore = useTagStore(); @@ -39,7 +39,9 @@ const PersonalStatistics = (props: Props) => { return (
-

{t("common.statistics")}

+
+

{t("common.statistics")}

+
@@ -65,4 +67,4 @@ const PersonalStatistics = (props: Props) => { ); }; -export default PersonalStatistics; +export default UserStatisticsView;