Skip to content
Open
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
4 changes: 2 additions & 2 deletions app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export const APP_CONFIG_DEFAULTS: AppConfig = {
supportsScreenShare: true,
isPreConnectBufferEnabled: true,

logo: '/lk-logo.svg',
logo: 'lk-logo.svg',
accent: '#002cf2',
logoDark: '/lk-logo-dark.svg',
logoDark: 'lk-logo-dark.svg',
accentDark: '#1fd5f9',
startButtonText: 'Start call',

Expand Down
3 changes: 2 additions & 1 deletion app/api/token/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ type ConnectionDetails = {
const API_KEY = process.env.LIVEKIT_API_KEY;
const API_SECRET = process.env.LIVEKIT_API_SECRET;
const LIVEKIT_URL = process.env.LIVEKIT_URL;
const LOCAL_TOKEN_ROUTE_ENABLED = process.env.LEXVOICE_ENABLE_LOCAL_TOKEN_ROUTE === '1';

// don't cache the results
export const revalidate = 0;

export async function POST(req: Request) {
if (process.env.NODE_ENV !== 'development') {
if (process.env.NODE_ENV !== 'development' && !LOCAL_TOKEN_ROUTE_ENABLED) {
throw new Error(
'THIS API ROUTE IS INSECURE. DO NOT USE THIS ROUTE IN PRODUCTION WITHOUT AN AUTHENTICATION LAYER.'
);
Expand Down
44 changes: 1 addition & 43 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,44 +1,10 @@
import { Public_Sans } from 'next/font/google';
import localFont from 'next/font/local';
import { headers } from 'next/headers';
import { ThemeProvider } from '@/components/app/theme-provider';
import { ThemeToggle } from '@/components/app/theme-toggle';
import { cn } from '@/lib/shadcn/utils';
import { getAppConfig, getStyles } from '@/lib/utils';
import '@/styles/globals.css';

const publicSans = Public_Sans({
variable: '--font-public-sans',
subsets: ['latin'],
});

const commitMono = localFont({
display: 'swap',
variable: '--font-commit-mono',
src: [
{
path: '../fonts/CommitMono-400-Regular.otf',
weight: '400',
style: 'normal',
},
{
path: '../fonts/CommitMono-700-Regular.otf',
weight: '700',
style: 'normal',
},
{
path: '../fonts/CommitMono-400-Italic.otf',
weight: '400',
style: 'italic',
},
{
path: '../fonts/CommitMono-700-Italic.otf',
weight: '700',
style: 'italic',
},
],
});

interface RootLayoutProps {
children: React.ReactNode;
}
Expand All @@ -50,15 +16,7 @@ export default async function RootLayout({ children }: RootLayoutProps) {
const { pageTitle, pageDescription, companyName, logo, logoDark } = appConfig;

return (
<html
lang="en"
suppressHydrationWarning
className={cn(
publicSans.variable,
commitMono.variable,
'scroll-smooth font-sans antialiased'
)}
>
<html lang="en" suppressHydrationWarning className={cn('scroll-smooth font-sans antialiased')}>
<head>
{styles && <style>{styles}</style>}
<title>{pageTitle}</title>
Expand Down
2 changes: 1 addition & 1 deletion components/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function App({ appConfig }: AppProps) {
const tokenSource = useMemo(() => {
return typeof process.env.NEXT_PUBLIC_CONN_DETAILS_ENDPOINT === 'string'
? getSandboxTokenSource(appConfig)
: TokenSource.endpoint('/api/token');
: TokenSource.endpoint('api/token');
}, [appConfig]);

const session = useSession(
Expand Down
2 changes: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
/* config options here */
assetPrefix: '.',
};

export default nextConfig;
8 changes: 4 additions & 4 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@

@theme inline {
--font-sans:
var(--font-public-sans), ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
--font-mono:
var(--font-commit-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
'Liberation Mono', 'Courier New', monospace;
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
monospace;

--color-background: var(--background);
--color-foreground: var(--foreground);
Expand Down