refactor: frontend (#5068)

* refactor: setting components

* refactor: frontend

* fix: settings router
This commit is contained in:
Sline
2025-10-15 18:57:44 +08:00
committed by GitHub
parent a591ee1efc
commit 0b4403b67b
34 changed files with 1072 additions and 861 deletions
+10 -5
View File
@@ -20,8 +20,13 @@ interface ItemProps {
onClick?: () => void | Promise<any>;
}
export const SettingItem: React.FC<ItemProps> = (props) => {
const { label, extra, children, secondary, onClick } = props;
export const SettingItem: React.FC<ItemProps> = ({
label,
extra,
children,
secondary,
onClick,
}) => {
const clickable = !!onClick;
const primary = (
@@ -65,7 +70,7 @@ export const SettingItem: React.FC<ItemProps> = (props) => {
export const SettingList: React.FC<{
title: string;
children: ReactNode;
}> = (props) => (
}> = ({ title, children }) => (
<List>
<ListSubheader
sx={[
@@ -78,9 +83,9 @@ export const SettingList: React.FC<{
]}
disableSticky
>
{props.title}
{title}
</ListSubheader>
{props.children}
{children}
</List>
);