Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

fix(onboarding): mark onboarding complete on the final step

Luis Ortiz1e3668b9cace
diff --git a/src/ui/onboarding/App.tsx b/src/ui/onboarding/App.tsx
index 0b5cbda..454aed8 100644
--- a/src/ui/onboarding/App.tsx
+++ b/src/ui/onboarding/App.tsx
@@ -672,6 +672,10 @@ function PinExtensionStep({ onNext, onSkip, index, total }: StepProps) {
}
function DoneStep() {
+ useEffect(() => {
+ localStorage.set({ onboardingCompleted: true });
+ }, []);
+
const handleOpen = async () => {
const permissionsPromise = requestHostPermissions();
await permissionsPromise;
@@ -781,10 +785,6 @@ const CONFIG_STEPS =
export default function OnboardingApp() {
const [step, setStep] = useState(0);
- useEffect(() => {
- localStorage.set({ onboardingCompleted: true });
- }, []);
-
const lastStep = CONFIG_STEPS.length + 1;
const next = () => setStep((s) => Math.min(s + 1, lastStep));
const CurrentStep = CONFIG_STEPS[step - 1];