Fix urls
This commit is contained in:
parent
9826253230
commit
d979d422c5
|
@ -8,7 +8,6 @@ import { Page } from 'web/components/page'
|
||||||
import { Title } from 'web/components/title'
|
import { Title } from 'web/components/title'
|
||||||
import { useUser } from 'web/hooks/use-user'
|
import { useUser } from 'web/hooks/use-user'
|
||||||
import { createPost } from 'web/lib/firebase/api'
|
import { createPost } from 'web/lib/firebase/api'
|
||||||
import { postPath } from 'web/lib/firebase/posts'
|
|
||||||
import { Row } from 'web/components/layout/row'
|
import { Row } from 'web/components/layout/row'
|
||||||
import { Button } from 'web/components/button'
|
import { Button } from 'web/components/button'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
|
@ -68,7 +67,7 @@ export default function CreateDateDocPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveDateDoc() {
|
async function saveDateDoc() {
|
||||||
if (!editor || !birthdayTime) return
|
if (!user || !editor || !birthdayTime) return
|
||||||
|
|
||||||
const newPost: Omit<
|
const newPost: Omit<
|
||||||
DateDoc,
|
DateDoc,
|
||||||
|
@ -89,7 +88,7 @@ export default function CreateDateDocPage() {
|
||||||
return e
|
return e
|
||||||
})
|
})
|
||||||
if (result.post) {
|
if (result.post) {
|
||||||
await Router.push(postPath(result.post.slug))
|
await Router.push(`/date-docs/${user.username}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ export default function DatePage(props: {
|
||||||
<Row className="items-center justify-between">
|
<Row className="items-center justify-between">
|
||||||
<Title className="!my-0 px-2 text-blue-500" text="Date docs" />
|
<Title className="!my-0 px-2 text-blue-500" text="Date docs" />
|
||||||
{!hasDoc && (
|
{!hasDoc && (
|
||||||
<SiteLink href="/date/create" className="!no-underline">
|
<SiteLink href="/date-docs/create" className="!no-underline">
|
||||||
<Button className="flex flex-row gap-1" color="blue">
|
<Button className="flex flex-row gap-1" color="blue">
|
||||||
<PlusCircleIcon
|
<PlusCircleIcon
|
||||||
className={'h-5 w-5 flex-shrink-0 text-white'}
|
className={'h-5 w-5 flex-shrink-0 text-white'}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user