Fix SetupWizard: remove Firestore save and fix text visibility

This commit is contained in:
nmemmert committed 2025-10-27 11:26:57 -04:00
1 parent 8f89f71122
commit 884dc7e835
1 file changed
+19 -25
+19 -25
View File
@@ -147,15 +147,9 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
return account; return account;
}); });
await DataService.saveUserData('current-user-id', {
accounts: accountsWithDefaults,
envelopes: envelopesWithAllocations,
transactions: [],
setupCompleted: true,
});
onComplete(accountsWithDefaults, envelopesWithAllocations); onComplete(accountsWithDefaults, envelopesWithAllocations);
} catch (error) { } catch (error) {
console.error('Error saving setup data:', error); console.error('Error completing setup:', error);
} }
}; };
@@ -163,8 +157,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
<div className="text-center"> <div className="text-center">
<div className="mb-8"> <div className="mb-8">
<div className="text-6xl mb-4">💰</div> <div className="text-6xl mb-4">💰</div>
<h1 className="text-3xl font-bold text-gray-900 dark:text-white mb-2">Welcome to Envelope Budgeting</h1> <h1 className="text-3xl font-bold text-gray-900 mb-2">Welcome to Envelope Budgeting</h1>
<p className="text-gray-600 dark:text-gray-300">Let's set up your budget to get started with secure, organized financial tracking.</p> <p className="text-gray-600 mb-4">Let's set up your budget to get started with secure, organized financial tracking.</p>
</div> </div>
<div className="space-y-4"> <div className="space-y-4">
@@ -187,8 +181,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
const renderDataSource = () => ( const renderDataSource = () => (
<div className="text-center"> <div className="text-center">
<div className="mb-8"> <div className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">How would you like to set up your data?</h2> <h2 className="text-2xl font-bold text-gray-900 mb-2">How would you like to set up your data?</h2>
<p className="text-gray-600 dark:text-gray-300">Choose how you'd like to get started with your budget.</p> <p className="text-gray-600">Choose how you'd like to get started with your budget.</p>
</div> </div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8"> <div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
@@ -200,8 +194,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
className="p-6 border-2 border-gray-200 rounded-lg hover:border-blue-500 transition-colors" className="p-6 border-2 border-gray-200 rounded-lg hover:border-blue-500 transition-colors"
> >
<div className="text-4xl mb-3">📊</div> <div className="text-4xl mb-3">📊</div>
<h3 className="font-semibold text-gray-900 dark:text-white mb-2">Import Data</h3> <h3 className="font-semibold text-gray-900 mb-2">Import Data</h3>
<p className="text-sm text-gray-600 dark:text-gray-300">Upload CSV files from your bank or credit card statements</p> <p className="text-sm text-gray-600">Upload CSV files from your bank or credit card statements</p>
</button> </button>
<button <button
@@ -212,8 +206,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
className="p-6 border-2 border-gray-200 rounded-lg hover:border-blue-500 transition-colors" className="p-6 border-2 border-gray-200 rounded-lg hover:border-blue-500 transition-colors"
> >
<div className="text-4xl mb-3">✏️</div> <div className="text-4xl mb-3">✏️</div>
<h3 className="font-semibold text-gray-900 dark:text-white mb-2">Manual Setup</h3> <h3 className="font-semibold text-gray-900 mb-2">Manual Setup</h3>
<p className="text-sm text-gray-600 dark:text-gray-300">Add your accounts and envelopes manually</p> <p className="text-sm text-gray-600">Add your accounts and envelopes manually</p>
</button> </button>
</div> </div>
@@ -229,8 +223,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
const renderAccounts = () => ( const renderAccounts = () => (
<div> <div>
<div className="mb-8"> <div className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">Set Up Your Accounts</h2> <h2 className="text-2xl font-bold text-gray-900 mb-2">Set Up Your Accounts</h2>
<p className="text-gray-600 dark:text-gray-300">Add your bank accounts, credit cards, and other financial accounts.</p> <p className="text-gray-600">Add your bank accounts, credit cards, and other financial accounts.</p>
</div> </div>
{/* Existing Accounts */} {/* Existing Accounts */}
@@ -380,8 +374,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
const renderEnvelopes = () => ( const renderEnvelopes = () => (
<div> <div>
<div className="mb-8"> <div className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">Create Your Envelopes</h2> <h2 className="text-2xl font-bold text-gray-900 mb-2">Create Your Envelopes</h2>
<p className="text-gray-600 dark:text-gray-300">Set up budget categories for different spending areas.</p> <p className="text-gray-600">Set up budget categories for different spending areas.</p>
</div> </div>
{/* Existing Envelopes */} {/* Existing Envelopes */}
@@ -577,8 +571,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
const renderIncomeSetup = () => ( const renderIncomeSetup = () => (
<div> <div>
<div className="mb-8"> <div className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">Income Allocation Setup</h2> <h2 className="text-2xl font-bold text-gray-900 mb-2">Income Allocation Setup</h2>
<p className="text-gray-600 dark:text-gray-300">Set up how your income is automatically allocated to envelopes.</p> <p className="text-gray-600">Set up how your income is automatically allocated to envelopes.</p>
</div> </div>
{/* Income Allocation Settings */} {/* Income Allocation Settings */}
@@ -690,8 +684,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
const renderGetPaidSetup = () => ( const renderGetPaidSetup = () => (
<div> <div>
<div className="mb-8"> <div className="mb-8">
<h2 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">Get Paid Setup</h2> <h2 className="text-2xl font-bold text-gray-900 mb-2">Get Paid Setup</h2>
<p className="text-gray-600 dark:text-gray-300">Set up your default paycheck amounts for quick income entry.</p> <p className="text-gray-600">Set up your default paycheck amounts for quick income entry.</p>
</div> </div>
{/* Default Paycheck Amounts */} {/* Default Paycheck Amounts */}
@@ -777,8 +771,8 @@ export default function SetupWizard({ onComplete, onSkip }: SetupWizardProps) {
<div className="text-center"> <div className="text-center">
<div className="mb-8"> <div className="mb-8">
<div className="text-6xl mb-4">🎉</div> <div className="text-6xl mb-4">🎉</div>
<h2 className="text-2xl font-bold text-gray-900 dark:text-white mb-2">Setup Complete!</h2> <h2 className="text-2xl font-bold text-gray-900 mb-2">Setup Complete!</h2>
<p className="text-gray-600 dark:text-gray-300">Your envelope budgeting system is ready to use.</p> <p className="text-gray-600">Your envelope budgeting system is ready to use.</p>
</div> </div>
<div className="bg-gray-50 rounded-lg p-6 mb-8"> <div className="bg-gray-50 rounded-lg p-6 mb-8">