Skip to content

Commit

Permalink
rever to new page for new post
Browse files Browse the repository at this point in the history
  • Loading branch information
stiven-ding committed May 1, 2024
1 parent f4201e8 commit d04f2e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion app/[...code]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ const ReviewPage = async ({ params }: { params: { code: string[] } }) => {

<div className="content-center">
<div className='flex-row flex space-x-2'>
<DrawerSubmit code={code} />

<Link href={'/submit/' + code}>
<Button className='text-sm px-2 hover:shadow-lg bg-white text-blue-800 hover:bg-gray-200'>
<ClipboardEdit size={16} /><span> 發表主題 New Post</span>
</Button>
</Link>
{//<DrawerSubmit code={code} />
}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/submit/[code]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const SubmitPage = ({ params }: { params: any }) => {
const [isSubmitting, setIsSubmitting] = useState(false);
const formSchema = z.object({
code: z.string().min(1).default(params.code),
title: z.string().min(3).max(20).default(''),
title: z.string().min(3).max(40).default(''),
content: z.string().min(10).max(2000),
})

Expand Down

0 comments on commit d04f2e7

Please sign in to comment.