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