mirror of
https://github.com/Afilmory/afilmory
synced 2026-02-01 22:48:17 +00:00
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>
This commit is contained in:
@@ -1,13 +1,7 @@
|
||||
import { MainPageLayout } from '~/components/layouts/MainPageLayout'
|
||||
import { SettingsForm, SettingsNavigation } from '~/modules/settings'
|
||||
import { redirect } from 'react-router'
|
||||
|
||||
export function Component() {
|
||||
return (
|
||||
<MainPageLayout title="系统设置" description="管理后台与核心功能的通用配置,修改后会立即同步生效。">
|
||||
<div className="space-y-6">
|
||||
<SettingsNavigation active="site" />
|
||||
<SettingsForm />
|
||||
</div>
|
||||
</MainPageLayout>
|
||||
)
|
||||
return null
|
||||
}
|
||||
|
||||
export const loader = () => redirect('/settings/site')
|
||||
|
||||
Reference in New Issue
Block a user