Skip to content

Commit c7289ff

Browse files
chore: tidyup (#286)
1 parent 8c48f59 commit c7289ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1842
-1936
lines changed

app-config.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
import type { AppConfig } from './lib/types';
1+
export interface AppConfig {
2+
pageTitle: string;
3+
pageDescription: string;
4+
companyName: string;
5+
6+
supportsChatInput: boolean;
7+
supportsVideoInput: boolean;
8+
supportsScreenShare: boolean;
9+
isPreConnectBufferEnabled: boolean;
10+
11+
logo: string;
12+
startButtonText: string;
13+
accent?: string;
14+
logoDark?: string;
15+
accentDark?: string;
16+
17+
sandboxId?: string;
18+
agentName?: string;
19+
}
220

321
export const APP_CONFIG_DEFAULTS: AppConfig = {
422
companyName: 'LiveKit',
@@ -15,6 +33,4 @@ export const APP_CONFIG_DEFAULTS: AppConfig = {
1533
logoDark: '/lk-logo-dark.svg',
1634
accentDark: '#1fd5f9',
1735
startButtonText: 'Start call',
18-
19-
agentName: undefined,
2036
};

app/(app)/layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { headers } from 'next/headers';
22
import { getAppConfig } from '@/lib/utils';
33

4-
interface AppLayoutProps {
4+
interface LayoutProps {
55
children: React.ReactNode;
66
}
77

8-
export default async function AppLayout({ children }: AppLayoutProps) {
8+
export default async function Layout({ children }: LayoutProps) {
99
const hdrs = await headers();
1010
const { companyName, logo, logoDark } = await getAppConfig(hdrs);
1111

@@ -39,6 +39,7 @@ export default async function AppLayout({ children }: AppLayoutProps) {
3939
</a>
4040
</span>
4141
</header>
42+
4243
{children}
4344
</>
4445
);

app/(app)/opengraph-image.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default async function Image() {
165165
gap: 10,
166166
}}
167167
>
168-
{/* eslint-disable-next-line @next/next/no-img-element, jsx-a11y/alt-text */}
168+
{/* eslint-disable-next-line jsx-a11y/alt-text */}
169169
<img src={wordmarkSrcBase64} width={wordmarkSize.width} height={wordmarkSize.height} />
170170
</div>
171171
{/* logo */}
@@ -179,7 +179,7 @@ export default async function Image() {
179179
gap: 10,
180180
}}
181181
>
182-
{/* eslint-disable-next-line @next/next/no-img-element, jsx-a11y/alt-text */}
182+
{/* eslint-disable-next-line jsx-a11y/alt-text */}
183183
<img src={logoSrcBase64} width={logoSize.width} height={logoSize.height} />
184184
</div>
185185
{/* title */}

app/(app)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { headers } from 'next/headers';
2-
import { App } from '@/components/app';
2+
import { App } from '@/components/app/app';
33
import { getAppConfig } from '@/lib/utils';
44

55
export default async function Page() {

app/api/connection-details/route.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import { NextResponse } from 'next/server';
22
import { AccessToken, type AccessTokenOptions, type VideoGrant } from 'livekit-server-sdk';
33
import { RoomConfiguration } from '@livekit/protocol';
44

5+
type ConnectionDetails = {
6+
serverUrl: string;
7+
roomName: string;
8+
participantName: string;
9+
participantToken: string;
10+
};
11+
512
// NOTE: you are expected to define the following environment variables in `.env.local`:
613
const API_KEY = process.env.LIVEKIT_API_KEY;
714
const API_SECRET = process.env.LIVEKIT_API_SECRET;
@@ -10,13 +17,6 @@ const LIVEKIT_URL = process.env.LIVEKIT_URL;
1017
// don't cache the results
1118
export const revalidate = 0;
1219

13-
export type ConnectionDetails = {
14-
serverUrl: string;
15-
roomName: string;
16-
participantName: string;
17-
participantToken: string;
18-
};
19-
2020
export async function POST(req: Request) {
2121
try {
2222
if (LIVEKIT_URL === undefined) {

app/components/Container.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/components/Tabs.tsx

Lines changed: 0 additions & 33 deletions
This file was deleted.

app/components/base/page.tsx

Lines changed: 0 additions & 132 deletions
This file was deleted.

app/components/layout.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

app/components/livekit/page.tsx

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)