mirror of
https://github.com/penxio/penx.git
synced 2026-01-12 23:18:09 -05:00
20 lines
391 B
TypeScript
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'
|
|
}
|
|
}
|