Fix setup guide access in SupabaseStatus component

cgen-48597391aab541e085cac2ff19164b2f
This commit is contained in:
Builder.io 2025-08-06 00:21:26 +00:00
parent 14f7f9bcf6
commit cf7f1843aa

View file

@ -23,7 +23,35 @@ export default function SupabaseStatus() {
size="sm"
variant="outline"
className="border-amber-500/50 text-amber-300 hover:bg-amber-500/20"
onClick={() => window.open('/SUPABASE_SETUP.md', '_blank')}
onClick={() => {
const setupContent = `# Quick Supabase Setup for AeThex
## 1. Get Your Credentials
1. Go to your Supabase dashboard: https://app.supabase.com/projects/etzlqcghfdrkdqqfvzac
2. Go to Settings > API
3. Copy your Project URL and anon key
## 2. Update Environment Variables
Use the DevServerControl or set these values:
VITE_SUPABASE_URL=https://etzlqcghfdrkdqqfvzac.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key-here
## 3. Run Database Migration
Go to Database > SQL Editor in Supabase and run the migration from the full setup guide.
## 4. Restart Dev Server
After setting variables, restart your development server.`;
navigator.clipboard.writeText(setupContent).then(() => {
alert('Setup instructions copied to clipboard!');
}).catch(() => {
const newWindow = window.open('', '_blank');
if (newWindow) {
newWindow.document.write('<pre>' + setupContent + '</pre>');
}
});
}}
>
<Info className="h-3 w-3 mr-1" />
Setup Guide