Skip to content

Commit 7d934ff

Browse files
authored
Update next example to next v14 (#996)
1 parent 6ef4005 commit 7d934ff

16 files changed

+134
-133
lines changed

examples/nextjs/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": ["next", "next/core-web-vitals"]
33
}

examples/nextjs/next.config.js renamed to examples/nextjs/next.config.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @ts-check
2+
13
/** @type {import('next').NextConfig} */
24
const nextConfig = {
35
reactStrictMode: true,

examples/nextjs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@livekit/component-example-next",
33
"version": "0.2.40",
44
"private": true,
5+
"type": "module",
56
"scripts": {
67
"dev": "next dev",
78
"build": "next build",
@@ -14,7 +15,7 @@
1415
"@livekit/track-processors": "^0.3.2",
1516
"livekit-client": "^2.5.4",
1617
"livekit-server-sdk": "^2.6.1",
17-
"next": "^12.3.4",
18+
"next": "^14.2.13",
1819
"react": "^18.2.0",
1920
"react-dom": "^18.2.0"
2021
},

examples/nextjs/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import '../styles/globals.css';
2-
import type { AppProps } from 'next/app';
2+
import type { AppProps } from 'next/app.js';
33
import '@livekit/components-styles';
44

55
function MyApp({ Component, pageProps }: AppProps) {

examples/nextjs/pages/audio-only.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { AudioConference, LiveKitRoom, useToken } from '@livekit/components-react';
24
import type { NextPage } from 'next';
35
import { generateRandomUserId } from '../lib/helper';

examples/nextjs/pages/clubhouse.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import {
24
ControlBar,
35
LiveKitRoom,

examples/nextjs/pages/customize.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import {
24
LiveKitRoom,
35
ParticipantName,

examples/nextjs/pages/e2ee.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { LiveKitRoom, useToken, VideoConference, setLogLevel } from '@livekit/components-react';
24
import type { NextPage } from 'next';
35
import * as React from 'react';

examples/nextjs/pages/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
'use client';
2+
13
import type { NextPage } from 'next';
2-
import Head from 'next/head';
34
import styles from '../styles/Home.module.scss';
5+
import Head from 'next/head';
46

57
const EXAMPLE_ROUTES = {
68
voiceAssistant: {

examples/nextjs/pages/minimal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
'use client';
2+
13
import { LiveKitRoom, useToken, VideoConference, setLogLevel } from '@livekit/components-react';
2-
import { RoomConnectOptions } from 'livekit-client';
34
import type { NextPage } from 'next';
45
import { generateRandomUserId } from '../lib/helper';
56
import { useMemo } from 'react';

0 commit comments

Comments
 (0)