mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-26 18:28:35 +02:00
fixed router call
This commit is contained in:
@@ -22,13 +22,13 @@ import { toast } from "sonner"
|
|||||||
import { useRouter } from "next/navigation"
|
import { useRouter } from "next/navigation"
|
||||||
|
|
||||||
const TITLE_PLACEHOLDER = "Untitled"
|
const TITLE_PLACEHOLDER = "Untitled"
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const emptyPage = (page: PersonalPage): boolean => {
|
const emptyPage = (page: PersonalPage): boolean => {
|
||||||
return (!page.title || page.title.trim() === "") && (!page.content || Object.keys(page.content).length === 0)
|
return (!page.title || page.title.trim() === "") && (!page.content || Object.keys(page.content).length === 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const deleteEmptyPage = (currentPageId: string | null) => {
|
export const deleteEmptyPage = (currentPageId: string | null) => {
|
||||||
const router = useRouter()
|
|
||||||
const { me } = useAccount({
|
const { me } = useAccount({
|
||||||
root: {
|
root: {
|
||||||
personalPages: []
|
personalPages: []
|
||||||
|
|||||||
Reference in New Issue
Block a user