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
|
fi
|
||||||
|
|
||||||
# Fix database name to match compose file
|
# 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
|
# Generate app key if not set or empty
|
||||||
if ! grep -q "APP_KEY=base64:" /var/www/html/.env; then
|
if ! grep -q "APP_KEY=base64:" /var/www/html/.env; then
|
||||||
|
|
|
||||||
|
|
@ -59,4 +59,5 @@ networks:
|
||||||
volumes:
|
volumes:
|
||||||
db_data:
|
db_data:
|
||||||
driver: local
|
driver: local
|
||||||
app_node_modules:
|
app_node_modules:
|
||||||
|
driver: local
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
|
||||||
case 'milestones':
|
case 'milestones':
|
||||||
return <AddMilestoneForm onSuccess={handleStepComplete} />;
|
return <AddMilestoneForm onSuccess={handleStepComplete} />;
|
||||||
case 'price':
|
case 'price':
|
||||||
return <PriceTrackingStep onEnable={handleStepComplete} onSkip={onComplete} />;
|
return <PriceTrackingStep onEnable={handleStepComplete} onSkip={onComplete ?? (() => {})} />;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ export default function Dashboard() {
|
||||||
const hasMilestones = milestonesData.length > 0;
|
const hasMilestones = milestonesData.length > 0;
|
||||||
|
|
||||||
// User needs onboarding if any required step is missing
|
// User needs onboarding if any required step is missing
|
||||||
const needsOnboarding = !hasAsset || !hasPurchases || !hasMilestones;
|
const needsOnboarding = !hasPurchases || !hasMilestones;
|
||||||
setNeedsOnboarding(needsOnboarding);
|
setNeedsOnboarding(needsOnboarding);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to check onboarding status:', error);
|
console.error('Failed to check onboarding status:', error);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue