Skip to content

Commit 5c96a65

Browse files
committed
refactor(settings): simplify settings component and implement redirect
- Removed the MainPageLayout and its associated components from the settings page, returning null instead. - Added a loader function to redirect users to the '/settings/site' path, streamlining navigation within the application. Signed-off-by: Innei <tukon479@gmail.com>
1 parent dbc8be1 commit 5c96a65

File tree

1 file changed

+4
-10
lines changed
  • be/apps/dashboard/src/pages/(main)/settings

1 file changed

+4
-10
lines changed
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
import { MainPageLayout } from '~/components/layouts/MainPageLayout'
2-
import { SettingsForm, SettingsNavigation } from '~/modules/settings'
1+
import { redirect } from 'react-router'
32

43
export function Component() {
5-
return (
6-
<MainPageLayout title="系统设置" description="管理后台与核心功能的通用配置,修改后会立即同步生效。">
7-
<div className="space-y-6">
8-
<SettingsNavigation active="site" />
9-
<SettingsForm />
10-
</div>
11-
</MainPageLayout>
12-
)
4+
return null
135
}
6+
7+
export const loader = () => redirect('/settings/site')

0 commit comments

Comments
 (0)