Skip to content

Commit

Permalink
fix: outdated config schema
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-rw committed Dec 30, 2023
1 parent 19e65e0 commit b2b5288
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/default.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"schemaVersion": 1,
"schemaVersion": 2,
"configProperties": {
"name": "default"
},
Expand Down
21 changes: 19 additions & 2 deletions src/components/Onboarding/onboarding-steps.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
import { Stack, Stepper } from '@mantine/core';
import { useState } from 'react';
import { useEffect, useState } from 'react';

import { StepCreateAccount } from './step-create-account';
import { StepOnboardingFinished } from './step-onboarding-finished';
import { StepUpdatePathMappings } from './step-update-path-mappings';

export const OnboardingSteps = ({ isUpdate }: { isUpdate: boolean }) => {
const maximumSteps = 3;

const [currentStep, setCurrentStep] = useState(0);
const nextStep = () => setCurrentStep((current) => (current < 3 ? current + 1 : current));

const nextStep = () => setCurrentStep((current) => (current < maximumSteps ? current + 1 : current));

const prevStep = () => setCurrentStep((current) => (current > 0 ? current - 1 : current));

const onFinishOnboarding = () => {
console.log('finished onboarding!');
};

useEffect(() => {
console.log('current step', currentStep, 'maximum', maximumSteps);
if (currentStep < maximumSteps) {
return;
}

onFinishOnboarding();
}, [currentStep]);

return (
<Stack p="lg">
<Stepper
Expand Down

0 comments on commit b2b5288

Please sign in to comment.