mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
fixed router call
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import React, { useCallback, useRef, useEffect } from "react"
|
||||
import { useCallback, useRef, useEffect } from "react"
|
||||
import { ID } from "jazz-tools"
|
||||
import { PersonalPage } from "@/lib/schema"
|
||||
import { LAEditor, LAEditorRef } from "@/components/la-editor"
|
||||
@@ -22,13 +22,13 @@ import { toast } from "sonner"
|
||||
import { useRouter } from "next/navigation"
|
||||
|
||||
const TITLE_PLACEHOLDER = "Untitled"
|
||||
const router = useRouter()
|
||||
|
||||
const emptyPage = (page: PersonalPage): boolean => {
|
||||
return (!page.title || page.title.trim() === "") && (!page.content || Object.keys(page.content).length === 0)
|
||||
}
|
||||
|
||||
export const deleteEmptyPage = (currentPageId: string | null) => {
|
||||
const router = useRouter()
|
||||
const { me } = useAccount({
|
||||
root: {
|
||||
personalPages: []
|
||||
|
||||
Reference in New Issue
Block a user