import type { LoaderFunctionArgs } from '@remix-run/cloudflare'; import { json, type MetaFunction } from '@remix-run/cloudflare'; import { useLoaderData } from '@remix-run/react'; import { ClientOnly } from 'remix-utils/client-only'; import { BaseChat } from '~/components/chat/BaseChat'; import { GitUrlImport } from '~/components/git/GitUrlImport.client'; import { Header } from '~/components/header/Header'; export const meta: MetaFunction = () => { return [{ title: 'Bolt' }, { name: 'description', content: 'Talk with Bolt, an AI assistant from StackBlitz' }]; }; interface LoaderData { url: string; } export async function loader({ request }: LoaderFunctionArgs) { const url = new URL(request.url); const gitUrl = url.searchParams.get('url'); if (!gitUrl) { throw new Response('No Git URL provided', { status: 400 }); } return json({ url: gitUrl }); } export default function Index() { const data = useLoaderData(); return (
}>{() => }
); }