Files
penx/apps/web/lib/getDashboardPath.ts
2025-07-23 20:33:59 +08:00

20 lines
391 B
TypeScript

interface Features {
journal: boolean
gallery: boolean
page: boolean
database: boolean
}
export function getDashboardPath(space: any) {
if (!space) return '/~/creations?type=ARTICLE'
const { features } = (space.config || {}) as any as {
features: Features
}
if (features?.journal) {
return '/~/page?id=today'
} else {
return '/~/creations?type=ARTICLE'
}
}