调整桌面首页进入创作主页
桌面端打开根路径默认进入创作主页 移动端根路径继续保持推荐首页 补充首页初始路由测试与创作主页文档说明
This commit is contained in:
@@ -101,6 +101,20 @@ export function resolveSelectionStageFromPath(
|
||||
return ROUTE_STAGE_BY_PATH.get(normalizeAppPath(pathname)) ?? 'platform';
|
||||
}
|
||||
|
||||
export function resolveInitialSelectionStageFromPath(
|
||||
pathname: string,
|
||||
isDesktopLayout: boolean,
|
||||
): SelectionStage {
|
||||
const normalizedPath = normalizeAppPath(pathname);
|
||||
const selectionStage = resolveSelectionStageFromPath(pathname);
|
||||
|
||||
if (normalizedPath === '/' && isDesktopLayout) {
|
||||
return 'creation-home';
|
||||
}
|
||||
|
||||
return selectionStage;
|
||||
}
|
||||
|
||||
export function resolvePathForSelectionStage(stage: SelectionStage) {
|
||||
return APP_STAGE_ROUTES[stage] ?? APP_STAGE_ROUTES.platform;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user