feat: add avatar (#47)

This commit is contained in:
Roberto Vidal
2024-08-22 10:11:38 +02:00
committed by GitHub
parent a7b1f5046d
commit b4cfe6ab8b
12 changed files with 104 additions and 85 deletions

View File

@@ -1,16 +1,16 @@
import { type LoaderFunctionArgs, type MetaFunction } from '@remix-run/cloudflare';
import { json, type LoaderFunctionArgs, type MetaFunction } from '@remix-run/cloudflare';
import { ClientOnly } from 'remix-utils/client-only';
import { BaseChat } from '~/components/chat/BaseChat';
import { Chat } from '~/components/chat/Chat.client';
import { Header } from '~/components/header/Header';
import { handleAuthRequest } from '~/lib/.server/login';
import { loadWithAuth } from '~/lib/.server/auth';
export const meta: MetaFunction = () => {
return [{ title: 'Bolt' }, { name: 'description', content: 'Talk with Bolt, an AI assistant from StackBlitz' }];
};
export async function loader(args: LoaderFunctionArgs) {
return handleAuthRequest(args);
return loadWithAuth(args, async (_args, session) => json({ avatar: session.avatar }));
}
export default function Index() {