@@ -18,8 +18,8 @@ import { getNoteImgSrc, useIsPending } from '#app/utils/misc.tsx'
18
18
import { requireUserWithPermission } from '#app/utils/permissions.server.ts'
19
19
import { redirectWithToast } from '#app/utils/toast.server.ts'
20
20
import { userHasPermission , useOptionalUser } from '#app/utils/user.ts'
21
- import { type Route , type Info } from './+types/notes.$noteId.ts'
22
- import { type Info as notesInfo } from './+types/notes.ts'
21
+ import { type Route } from './+types/notes.$noteId.ts'
22
+ import { type Route as NotesRoute } from './+types/notes.ts'
23
23
24
24
export async function loader ( { params } : Route . LoaderArgs ) {
25
25
const note = await prisma . note . findUnique ( {
@@ -173,7 +173,7 @@ export function DeleteNote({
173
173
actionData,
174
174
} : {
175
175
id : string
176
- actionData : Info [ 'actionData' ] | undefined
176
+ actionData : Route . ComponentProps [ 'actionData' ] | undefined
177
177
} ) {
178
178
const isPending = useIsPending ( )
179
179
const [ form ] = useForm ( {
@@ -205,7 +205,7 @@ export function DeleteNote({
205
205
export const meta : Route . MetaFunction = ( { data, params, matches } ) => {
206
206
const notesMatch = matches . find (
207
207
( m ) => m ?. id === 'routes/users+/$username_+/notes' ,
208
- ) as { data : notesInfo [ 'loaderData' ] } | undefined
208
+ ) as { data : NotesRoute . ComponentProps [ 'loaderData' ] } | undefined
209
209
210
210
const displayName = notesMatch ?. data ?. owner . name ?? params . username
211
211
const noteTitle = data ?. note . title ?? 'Note'
0 commit comments