mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-29 16:05:35 +08:00
### What problem does this PR solve? Feat: Add ProfileSetting page #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
20
web/src/pages/profile-setting/hooks.tsx
Normal file
20
web/src/pages/profile-setting/hooks.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import { ProfileSettingRouteKey } from '@/constants/setting';
|
||||
import { useSecondPathName } from '@/hooks/route-hook';
|
||||
|
||||
export const useGetPageTitle = (): string => {
|
||||
const pathName = useSecondPathName();
|
||||
|
||||
const LabelMap = {
|
||||
[ProfileSettingRouteKey.Profile]: 'User profile',
|
||||
[ProfileSettingRouteKey.Plan]: 'Plan & balance',
|
||||
[ProfileSettingRouteKey.Model]: 'Model management',
|
||||
[ProfileSettingRouteKey.System]: 'System',
|
||||
[ProfileSettingRouteKey.Api]: 'Api',
|
||||
[ProfileSettingRouteKey.Team]: 'Team management',
|
||||
[ProfileSettingRouteKey.Prompt]: 'Prompt management',
|
||||
[ProfileSettingRouteKey.Chunk]: 'Chunk method',
|
||||
[ProfileSettingRouteKey.Logout]: 'Logout',
|
||||
};
|
||||
|
||||
return LabelMap[pathName as ProfileSettingRouteKey];
|
||||
};
|
||||
Reference in New Issue
Block a user