Skip to content

Commit 3365b33

Browse files
feat: update to next 14 (#162)
* chore: update packages * fix: lint errors * fix: remove redundant option in next config * fix: misc fixes for new types * feat: add loader for route changes
1 parent 7f207fc commit 3365b33

File tree

10 files changed

+2244
-1575
lines changed

10 files changed

+2244
-1575
lines changed

frontend/app/[team]/apps/[app]/environments/[environment]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function Environment({
6464
const pathname = usePathname()
6565
const searchParams = useSearchParams()
6666

67-
const secretToHighlight = searchParams.get('secret')
67+
const secretToHighlight = searchParams?.get('secret')
6868
const highlightedRef = useRef<HTMLDivElement>(null)
6969

7070
const [envKeys, setEnvKeys] = useState<EnvKeyring | null>(null)

frontend/app/[team]/apps/[app]/syncing/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function Syncing({ params }: { params: { team: string; app: strin
3131

3232
const searchParams = useSearchParams()
3333

34-
const openCreateSyncPanel = searchParams.get('newSync')
34+
const openCreateSyncPanel = searchParams?.get('newSync')
3535

3636
const { data } = useQuery(GetAppSyncStatus, {
3737
variables: { appId: params.app },

frontend/app/[team]/integrations/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function Integrations({ params }: { params: { team: string } }) {
3232

3333
const searchParams = useSearchParams()
3434

35-
const openCreateCredentialDialog = searchParams.get('newCredential')
35+
const openCreateCredentialDialog = searchParams?.get('newCredential')
3636

3737
const { data: providersData } = useQuery(GetProviderList)
3838

frontend/app/invite/[invite]/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,12 @@ export default function Invite({ params }: { params: { invite: string } }) {
218218
return (
219219
<div className="mx-auto my-auto max-w-2xl space-y-8 p-16 bg-zinc-100 dark:bg-zinc-800 text-black dark:text-white rounded-md shadow-2xl text-center">
220220
<div className="flex flex-col gap-y-2 items-center">
221-
<h1 className="text-4xl text-black dark:text-white text-center font-bold">You're All Set</h1>
222-
<p className="text-black/30 dark:text-white/40 text-center">Your account is ready to go!</p>
221+
<h1 className="text-4xl text-black dark:text-white text-center font-bold">
222+
You&apos;re All Set
223+
</h1>
224+
<p className="text-black/30 dark:text-white/40 text-center">
225+
Your account is ready to go!
226+
</p>
223227
<div className="mx-auto pt-8">
224228
<Button
225229
variant="primary"

frontend/app/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Inter } from '@next/font/google'
66
import { ToastContainer } from 'react-toastify'
77
import 'react-toastify/dist/ReactToastify.min.css'
88
import '@/utils/logoAnimation.css'
9+
import NextTopLoader from 'nextjs-toploader'
910

1011
const inter = Inter({
1112
weight: 'variable',
@@ -25,6 +26,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
2526
<body
2627
className={`${inter.className} w-full bg-neutral-200 dark:bg-neutral-900 min-h-screen antialiased`}
2728
>
29+
<NextTopLoader color="#10B981" showSpinner={false} height={1} />
2830
<ToastContainer
2931
position="bottom-right"
3032
autoClose={5000}

frontend/app/signup/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ const Onboard = () => {
210210
const SuccessPane = () => {
211211
return (
212212
<div className="flex flex-col gap-y-2 items-center">
213-
<h1 className="text-4xl text-black dark:text-white text-center font-bold">You're All Set</h1>
213+
<h1 className="text-4xl text-black dark:text-white text-center font-bold">
214+
You&apos;re All Set
215+
</h1>
214216
<p className="text-black/30 dark:text-white/40 text-center">Your account is ready to go!</p>
215217
<div className="mx-auto pt-8">
216218
<Button

frontend/components/auth/SignInButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function SignInButtons() {
4646

4747
const searchParams = useSearchParams()
4848

49-
const callbackUrl = searchParams.get('callbackUrl')
49+
const callbackUrl = searchParams?.get('callbackUrl')
5050

5151
const titleText = () => (loading ? 'Logging you in' : 'Phase Console')
5252

frontend/next.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ const nextConfig = {
7070
]
7171
},
7272
experimental: {
73-
appDir: true,
7473
esmExternals: 'loose',
7574
},
7675
webpack: (config, options) => {

frontend/package.json

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,64 +11,65 @@
1111
"codegen": "graphql-codegen --config codegen.ts"
1212
},
1313
"dependencies": {
14-
"@apollo/client": "^3.7.10",
15-
"@headlessui/react": "^1.7.13",
16-
"@heroicons/react": "^2.0.16",
17-
"@next/font": "13.1.6",
18-
"@tailwindcss/typography": "^0.5.9",
19-
"@types/node": "18.14.0",
20-
"@types/react": "18.0.28",
21-
"@types/react-dom": "18.0.11",
22-
"axios": "^1.6.0",
14+
"@apollo/client": "^3.8.10",
15+
"@headlessui/react": "^1.7.18",
16+
"@heroicons/react": "^2.1.1",
17+
"@next/font": "14.1.0",
18+
"@tailwindcss/typography": "^0.5.10",
19+
"@types/node": "20.11.7",
20+
"@types/react": "^18.2.48",
21+
"@types/react-dom": "^18.2.18",
22+
"axios": "^1.6.7",
2323
"bip39": "^3.1.0",
24-
"clsx": "^1.2.1",
25-
"country-flag-icons": "^1.5.7",
26-
"cross-fetch": "^3.1.5",
27-
"eslint": "^8.34.0",
28-
"eslint-config-next": "13.1.6",
29-
"framer-motion": "^10.12.4",
24+
"clsx": "^2.1.0",
25+
"country-flag-icons": "^1.5.9",
26+
"cross-fetch": "^4.0.0",
27+
"eslint": "^8.56.0",
28+
"eslint-config-next": "14.1.0",
29+
"framer-motion": "^11.0.3",
3030
"graphql": "^16.8.1",
3131
"graphql-tag": "^2.12.6",
3232
"install": "^0.13.0",
33-
"jsonwebtoken": "^9.0.0",
33+
"jsonwebtoken": "^9.0.2",
3434
"jspdf": "^2.5.1",
35-
"libsodium-wrappers-sumo": "^0.7.11",
36-
"next": "13.1.6",
37-
"next-auth": "^4.20.1",
38-
"npm": "^9.9.0",
39-
"posthog-js": "^1.98.0",
40-
"react": "18.2.0",
41-
"react-dom": "18.2.0",
42-
"react-icons": "^4.8.0",
43-
"react-toastify": "^9.1.3",
44-
"reaviz": "^14.4.2",
45-
"sass": "^1.69.4",
46-
"typescript": "4.9.5",
35+
"libsodium-wrappers-sumo": "^0.7.13",
36+
"next": "^14.1.0",
37+
"next-auth": "^4.24.5",
38+
"nextjs-toploader": "^1.6.4",
39+
"npm": "^10.4.0",
40+
"posthog-js": "^1.103.0",
41+
"react": "^18.2.0",
42+
"react-dom": "^18.2.0",
43+
"react-icons": "^5.0.1",
44+
"react-toastify": "^10.0.4",
45+
"reaviz": "^15.6.1",
46+
"sass": "^1.70.0",
47+
"typescript": "5.3.3",
4748
"zxcvbn": "^4.4.2"
4849
},
4950
"devDependencies": {
50-
"@graphql-codegen/cli": "3.2.2",
51-
"@graphql-codegen/client-preset": "2.1.1",
52-
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
53-
"@types/country-flag-icons": "^1.2.0",
51+
"@graphql-codegen/cli": "5.0.0",
52+
"@graphql-codegen/client-preset": "4.1.0",
53+
"@graphql-codegen/typescript-react-apollo": "^4.1.0",
54+
"@types/country-flag-icons": "^1.2.2",
5455
"@types/jest": "^29.5.11",
55-
"@types/jsonwebtoken": "^9.0.1",
56-
"@types/libsodium-wrappers-sumo": "^0.7.5",
56+
"@types/jsonwebtoken": "^9.0.5",
57+
"@types/libsodium-wrappers-sumo": "^0.7.8",
5758
"@types/react-icons": "^3.0.0",
58-
"@types/zxcvbn": "^4.4.1",
59-
"@typescript-eslint/eslint-plugin": "^5.53.0",
60-
"@typescript-eslint/parser": "^5.53.0",
61-
"autoprefixer": "^10.4.13",
62-
"eslint-config-prettier": "^8.6.0",
63-
"eslint-plugin-jsx-a11y": "^6.7.1",
64-
"eslint-plugin-prettier": "^4.2.1",
65-
"eslint-plugin-react": "^7.32.2",
59+
"@types/zxcvbn": "^4.4.4",
60+
"@typescript-eslint/eslint-plugin": "^6.19.1",
61+
"@typescript-eslint/parser": "^6.19.1",
62+
"autoprefixer": "^10.4.17",
63+
"eslint-config-prettier": "^9.1.0",
64+
"eslint-plugin-jsx-a11y": "^6.8.0",
65+
"eslint-plugin-prettier": "^5.1.3",
66+
"eslint-plugin-react": "^7.33.2",
6667
"eslint-plugin-react-hooks": "^4.6.0",
6768
"jest": "^29.7.0",
6869
"jest-environment-jsdom": "^29.7.0",
69-
"postcss": "^8.4.31",
70-
"prettier": "^2.8.4",
71-
"tailwindcss": "^3.2.7",
72-
"ts-jest": "^29.1.1"
70+
"postcss": "^8.4.33",
71+
"prettier": "^3.2.4",
72+
"tailwindcss": "^3.4.1",
73+
"ts-jest": "^29.1.2"
7374
}
7475
}

0 commit comments

Comments
 (0)