Skip to content

Commit 171b205

Browse files
committed
chore: next 16
1 parent 84a3d05 commit 171b205

File tree

16 files changed

+624
-353
lines changed

16 files changed

+624
-353
lines changed

.github/workflows/prod-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
id: login-ecr
3838
uses: aws-actions/amazon-ecr-login@v1
3939
with:
40-
mask-password: "true"
40+
mask-password: 'true'
4141

4242
# This is a separate action that sets up buildx runner
4343
- name: Setup Docker Buildx

app/(auth)/forgot-password/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Metadata } from 'next'
22
import { SITE_NAME } from '@/lib/consts'
33
import { ForgotPasswordForm } from '@/components/forgot-password-form'
4+
import { Route } from 'next'
45

56
export const metadata: Metadata = {
67
title: `Forgot Password · ${SITE_NAME}`,
@@ -11,7 +12,7 @@ export default async function Page({
1112
}: {
1213
searchParams: Promise<{
1314
email?: string
14-
from?: string
15+
from?: Route
1516
}>
1617
}) {
1718
const { email, from = '/' } = await searchParams

app/(auth)/login/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LoginForm } from '@/components/login-form'
2-
import type { Metadata } from 'next'
2+
import type { Metadata, Route } from 'next'
33
import { SITE_NAME } from '@/lib/consts'
44
import { AnimatedBooksBackground } from '@/components/ui/animated-books-background'
55

@@ -12,7 +12,7 @@ export default async function Page({
1212
}: {
1313
searchParams: Promise<{
1414
email?: string
15-
from?: string
15+
from?: Route
1616
}>
1717
}) {
1818
const { email, from = '/' } = await searchParams

app/(protected)/admin/dashboard/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from '@/components/ui/breadcrumb'
99

1010
import { SITE_NAME } from '@/lib/consts'
11-
import type { Metadata } from 'next'
11+
import type { Metadata, Route } from 'next'
1212
import { LibrarySelector } from '@/components/dashboard/LibrarySelector'
1313
import { DateRangeSelector } from '@/components/dashboard/DateRangeSelector'
1414
import { IsLoggedIn } from '@/lib/firebase/firebase'
@@ -69,7 +69,7 @@ export default async function DashboardPage({
6969
sp.set('from', from)
7070
sp.set('to', to)
7171

72-
redirect('?' + sp.toString(), RedirectType.replace)
72+
redirect(('?' + sp.toString()) as Route, RedirectType.replace)
7373
}
7474

7575
const libsRes = await getListLibraries({ limit: 5 })
@@ -86,7 +86,7 @@ export default async function DashboardPage({
8686
const sp = new URLSearchParams(p)
8787
sp.set('library_id', libraryID)
8888

89-
redirect('./?' + sp.toString(), RedirectType.replace)
89+
redirect(('./?' + sp.toString()) as Route, RedirectType.replace)
9090
}
9191

9292
const fromDate = parse(from, 'dd-MM-yyyy', new Date())
@@ -102,7 +102,7 @@ export default async function DashboardPage({
102102
if (range.from) sp.set('from', format(range.from, 'dd-MM-yyyy'))
103103
if (range.to) sp.set('to', format(range.to, 'dd-MM-yyyy'))
104104

105-
redirect('./?' + sp.toString(), RedirectType.replace)
105+
redirect(('./?' + sp.toString()) as Route, RedirectType.replace)
106106
}
107107

108108
const start = startOfDay(parse(from, 'dd-MM-yyyy', new Date())).toJSON()

app/(protected)/admin/users/new/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function NewUser() {
2424
email,
2525
})
2626

27-
redirect('/users')
27+
redirect('/admin/users')
2828
}
2929

3030
return (

components/books/DetailBook.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ThreeDBook } from '@/components/books/three-d-book'
44
import { Badge } from '@/components/ui/badge'
55
import Link from 'next/link'
66
import { BookDetail } from '@/lib/types/book'
7-
import { unstable_ViewTransition as ViewTransition } from 'react'
7+
import { ViewTransition } from 'react'
88
import { getBookStatus } from '@/lib/utils'
99

1010
export const DetailBook: React.FC<

components/books/ListBook.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
CardTitle,
1010
} from '@/components/ui/card'
1111
import clsx from 'clsx'
12-
import { unstable_ViewTransition as ViewTransition } from 'react'
12+
import { ViewTransition } from 'react'
1313
import { getBookStatus } from '@/lib/utils'
1414

1515
export const ListBook: React.FC<{ book: Book }> = ({ book }) => {

components/borrows/DetailBorrow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { Borrow } from '@/lib/types/borrow'
2929
import { DateTime } from '@/components/common/DateTime'
3030
import { ThreeDBook } from '@/components/books/three-d-book'
3131
import { Route } from 'next'
32-
import { unstable_ViewTransition as ViewTransition } from 'react'
32+
import { ViewTransition } from 'react'
3333
import { Alert, AlertDescription, AlertTitle } from '../ui/alert'
3434

3535
export const DetailBorrow: React.FC<

components/forgot-password-form.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ import { Label } from '@/components/ui/label'
1414
import { useActionState, useEffect } from 'react'
1515
import { loginAction } from '@/lib/actions/login'
1616
import Link from 'next/link'
17+
import { Route } from 'next'
1718

1819
export function ForgotPasswordForm({
1920
className,
2021
...props
21-
}: React.ComponentPropsWithoutRef<'div'> & { email?: string; from: string }) {
22+
}: React.ComponentPropsWithoutRef<'div'> & { email?: string; from: Route }) {
2223
const initialState = {
2324
error: '',
2425
email: props.email ?? '',

components/login-form.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ import { useActionState, useEffect, useState } from 'react'
1515
import { loginAction } from '@/lib/actions/login'
1616
import Link from 'next/link'
1717
import { Checkbox } from './ui/checkbox'
18+
import { Route } from 'next'
1819

1920
export function LoginForm({
2021
className,
2122
...props
22-
}: React.ComponentPropsWithoutRef<'div'> & { email?: string; from: string }) {
23+
}: React.ComponentPropsWithoutRef<'div'> & { email?: string; from: Route }) {
2324
const initialState = {
2425
error: '',
2526
email: props.email ?? '',

0 commit comments

Comments
 (0)