Files
web/apps/scandic-web/utils/appendSlugToPathname.ts
2025-06-18 12:07:32 +00:00

12 lines
214 B
TypeScript

import { getPathname } from "./getPathname"
export async function appendSlugToPathname(slug?: string) {
const pathname = await getPathname()
if (!slug) {
return null
}
return `${pathname}/${slug}`
}