Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: for remove settings icon _index.tsx #1356

Merged
merged 1 commit into from
Feb 21, 2025
Merged
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
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>
);
}
Loading