Skip to content

Commit 1ace33e

Browse files
committed
update to latest sentry and fix types
1 parent ea41d99 commit 1ace33e

File tree

7 files changed

+1935
-2041
lines changed

7 files changed

+1935
-2041
lines changed

app/routes/settings+/profile.connections.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { prisma } from '#app/utils/db.server.ts'
2323
import { pipeHeaders } from '#app/utils/headers.server.js'
2424
import { makeTimings } from '#app/utils/timing.server.ts'
2525
import { createToastHeaders } from '#app/utils/toast.server.ts'
26-
import { type Info, type Route } from './+types/profile.connections.ts'
26+
import { type Route } from './+types/profile.connections.ts'
2727
import { type BreadcrumbHandle } from './profile.tsx'
2828

2929
export const handle: BreadcrumbHandle & SEOHandle = {
@@ -150,7 +150,7 @@ function Connection({
150150
connection,
151151
canDelete,
152152
}: {
153-
connection: Info['loaderData']['connections'][number]
153+
connection: Route.ComponentProps['loaderData']['connections'][number]
154154
canDelete: boolean
155155
}) {
156156
const deleteFetcher = useFetcher<typeof action>()

app/routes/settings+/profile.index.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { getUserImgSrc, useDoubleCheck } from '#app/utils/misc.tsx'
1515
import { authSessionStorage } from '#app/utils/session.server.ts'
1616
import { redirectWithToast } from '#app/utils/toast.server.ts'
1717
import { NameSchema, UsernameSchema } from '#app/utils/user-validation.ts'
18-
import { type Route, type Info } from './+types/profile.index.ts'
18+
import { type Route } from './+types/profile.index.ts'
1919
import { twoFAVerificationType } from './profile.two-factor.tsx'
2020

2121
export const handle: SEOHandle = {
@@ -219,7 +219,11 @@ async function profileUpdateAction({ userId, formData }: ProfileActionArgs) {
219219
}
220220
}
221221

222-
function UpdateProfile({ loaderData }: { loaderData: Info['loaderData'] }) {
222+
function UpdateProfile({
223+
loaderData,
224+
}: {
225+
loaderData: Route.ComponentProps['loaderData']
226+
}) {
223227
const fetcher = useFetcher<typeof profileUpdateAction>()
224228

225229
const [form, fields] = useForm({
@@ -293,9 +297,9 @@ async function signOutOfSessionsAction({ request, userId }: ProfileActionArgs) {
293297
}
294298

295299
function SignOutOfSessions({
296-
loaderData: loaderData,
300+
loaderData,
297301
}: {
298-
loaderData: Info['loaderData']
302+
loaderData: Route.ComponentProps['loaderData']
299303
}) {
300304
const dc = useDoubleCheck()
301305

app/routes/users+/$username_+/__note-editor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { Label } from '#app/components/ui/label.tsx'
2121
import { StatusButton } from '#app/components/ui/status-button.tsx'
2222
import { Textarea } from '#app/components/ui/textarea.tsx'
2323
import { cn, getNoteImgSrc, useIsPending } from '#app/utils/misc.tsx'
24-
import { type Info } from './+types/notes.$noteId_.edit.ts'
24+
import { type Route } from './+types/notes.$noteId_.edit.ts'
2525

2626
const titleMinLength = 1
2727
const titleMaxLength = 100
@@ -54,8 +54,8 @@ export function NoteEditor({
5454
note,
5555
actionData,
5656
}: {
57-
note?: Info['loaderData']['note']
58-
actionData?: Info['actionData']
57+
note?: Route.ComponentProps['loaderData']['note']
58+
actionData?: Route.ComponentProps['actionData']
5959
}) {
6060
const isPending = useIsPending()
6161

app/routes/users+/$username_+/notes.$noteId.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { getNoteImgSrc, useIsPending } from '#app/utils/misc.tsx'
1818
import { requireUserWithPermission } from '#app/utils/permissions.server.ts'
1919
import { redirectWithToast } from '#app/utils/toast.server.ts'
2020
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'
2323

2424
export async function loader({ params }: Route.LoaderArgs) {
2525
const note = await prisma.note.findUnique({
@@ -173,7 +173,7 @@ export function DeleteNote({
173173
actionData,
174174
}: {
175175
id: string
176-
actionData: Info['actionData'] | undefined
176+
actionData: Route.ComponentProps['actionData'] | undefined
177177
}) {
178178
const isPending = useIsPending()
179179
const [form] = useForm({
@@ -205,7 +205,7 @@ export function DeleteNote({
205205
export const meta: Route.MetaFunction = ({ data, params, matches }) => {
206206
const notesMatch = matches.find(
207207
(m) => m?.id === 'routes/users+/$username_+/notes',
208-
) as { data: notesInfo['loaderData'] } | undefined
208+
) as { data: NotesRoute.ComponentProps['loaderData'] } | undefined
209209

210210
const displayName = notesMatch?.data?.owner.name ?? params.username
211211
const noteTitle = data?.note.title ?? 'Note'

app/routes/users+/$username_+/notes.index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type Route } from './+types/notes.index.ts'
2-
import { type Info as notesInfo } from './+types/notes.ts'
2+
import { type Route as NotesRoute } from './+types/notes.ts'
33

44
export default function NotesIndexRoute() {
55
return (
@@ -12,7 +12,7 @@ export default function NotesIndexRoute() {
1212
export const meta: Route.MetaFunction = ({ params, matches }) => {
1313
const notesMatch = matches.find(
1414
(m) => m?.id === 'routes/users+/$username_+/notes',
15-
) as { data: notesInfo['loaderData'] }
15+
) as { data: NotesRoute.ComponentProps['loaderData'] }
1616

1717
const displayName = notesMatch?.data?.owner.name ?? params.username
1818
const noteCount = notesMatch?.data?.owner.notes.length ?? 0

0 commit comments

Comments
 (0)