Init NextJS #4
1 changed files with 6 additions and 3 deletions
refactor(timeline): replace client-side hash navigation with server action createPost that redirects to /#timeline
commit
ab8c576c6c
|
|
@ -1,3 +1,6 @@
|
|||
export const timeline = () => {
|
||||
window.location.hash = '#timeline';
|
||||
};
|
||||
'use server'
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
export async function createPost(id: string) {
|
||||
redirect(`/#timeline`)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue