Skip to content

Commit

Permalink
Update _index.tsx
Browse files Browse the repository at this point in the history
Removed the settings button in the landingpage.
  • Loading branch information
Stijnus committed Feb 20, 2025
1 parent 220e2da commit aa02448
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,25 @@ import { BaseChat } from '~/components/chat/BaseChat';
import { Chat } from '~/components/chat/Chat.client';
import { Header } from '~/components/header/Header';
import BackgroundRays from '~/components/ui/BackgroundRays';
import { ControlPanel } from '~/components/@settings';
import { SettingsButton } from '~/components/ui/SettingsButton';
import { useState } from 'react';

export const meta: MetaFunction = () => {
return [{ title: 'Bolt' }, { name: 'description', content: 'Talk with Bolt, an AI assistant from StackBlitz' }];
};

export const loader = () => json({});

/**
* Landing page component for Bolt
* Note: Settings functionality should ONLY be accessed through the sidebar menu.
* Do not add settings button/panel to this landing page as it was intentionally removed
* to keep the UI clean and consistent with the design system.
*/
export default function Index() {
const [showControlPanel, setShowControlPanel] = useState(false);

return (
<div className="flex flex-col h-full w-full bg-bolt-elements-background-depth-1">
<BackgroundRays />
<Header />
<ClientOnly fallback={<BaseChat />}>{() => <Chat />}</ClientOnly>
<div className="fixed bottom-4 right-4">
<SettingsButton onClick={() => setShowControlPanel(true)} />
</div>
<ClientOnly>
{() => <ControlPanel open={showControlPanel} onClose={() => setShowControlPanel(false)} />}
</ClientOnly>
</div>
);
}

0 comments on commit aa02448

Please sign in to comment.