37 - Fix PR review findings: needsOnboarding gate, onSkip guard, sed patterns, compose cleanup
This commit is contained in:
parent
c388452942
commit
16b579eceb
4 changed files with 5 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ if [ ! -f /var/www/html/.env ]; then
|
|||
fi
|
||||
|
||||
# Fix database name to match compose file
|
||||
sed -i 's/DB_DATABASE=incr$/DB_DATABASE=incr_dev/' /var/www/html/.env
|
||||
sed -i 's|^DB_DATABASE=.*|DB_DATABASE=incr_dev|' /var/www/html/.env
|
||||
|
||||
# Generate app key if not set or empty
|
||||
if ! grep -q "APP_KEY=base64:" /var/www/html/.env; then
|
||||
|
|
|
|||
|
|
@ -60,3 +60,4 @@ volumes:
|
|||
db_data:
|
||||
driver: local
|
||||
app_node_modules:
|
||||
driver: local
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
|
|||
case 'milestones':
|
||||
return <AddMilestoneForm onSuccess={handleStepComplete} />;
|
||||
case 'price':
|
||||
return <PriceTrackingStep onEnable={handleStepComplete} onSkip={onComplete} />;
|
||||
return <PriceTrackingStep onEnable={handleStepComplete} onSkip={onComplete ?? (() => {})} />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export default function Dashboard() {
|
|||
const hasMilestones = milestonesData.length > 0;
|
||||
|
||||
// User needs onboarding if any required step is missing
|
||||
const needsOnboarding = !hasAsset || !hasPurchases || !hasMilestones;
|
||||
const needsOnboarding = !hasPurchases || !hasMilestones;
|
||||
setNeedsOnboarding(needsOnboarding);
|
||||
} catch (error) {
|
||||
console.error('Failed to check onboarding status:', error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue