Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(NOJIRA-123): Update React demo #672

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"jest-transform-css": "^2.1.0",
"lerna": "^3.22.1",
"mini-css-extract-plugin": "^1.3.7",
"next": "^14.2.5",
"next": "^15.0.3",
"prettier": "^2.2.1",
"prop-types": "^15.7.2",
"raw-loader": "^4.0.2",
Expand Down
8 changes: 6 additions & 2 deletions packages/demo-nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Suspense } from 'react'

import { AppMenu } from './app-menu'
import '../shared/globals.css'

Expand All @@ -9,8 +11,10 @@ export default function AppLayout({ children }: { children: React.ReactNode }) {
This is an example <a href="https://nextjs.org">Next.js</a> app with{' '}
<a href="https://nextjs.org/docs/app">App Router</a>.
</h1>
<AppMenu />
{children}
<Suspense>
<AppMenu />
{children}
</Suspense>
</body>
</html>
)
Expand Down
13 changes: 11 additions & 2 deletions packages/demo-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@
"scripts": {
"start": "yarn next dev -p 9090",
"lint": "yarn eslint --ignore-path ../../.gitignore .",
"clean": "rm -rf ./.next"
"clean": "rm -rf ./.next",
"build": "next build"
},
"dependencies": {
"@typeform/embed": "5.2.0",
"@typeform/embed-react": "4.2.0"
"@typeform/embed-react": "4.2.0",
"next": "^15.0.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^22.10.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/demo-nextjs/shared/menu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from 'next/link'

export const Menu = ({ id }: { id: string }) => {
const links = {
const links: Record<string, string> = {
'/': 'widget',
'/popup': 'popup',
'/slider': 'slider',
Expand Down
3 changes: 2 additions & 1 deletion packages/demo-nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"name": "next"
}
],
"strictNullChecks": true
"strictNullChecks": true,
"target": "ES2017"
},
"include": [
"next-env.d.ts",
Expand Down
Loading
Loading