@hook-sdk/template 0.28.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2292,6 +2292,13 @@ function DevSkipOnboardingFab({ defaults }) {
|
|
|
2292
2292
|
const [state, setState] = (0, import_react13.useState)("idle");
|
|
2293
2293
|
const [errorMsg, setErrorMsg] = (0, import_react13.useState)(null);
|
|
2294
2294
|
const timerRef = (0, import_react13.useRef)(null);
|
|
2295
|
+
const isAuthed = hook.authStatus === "authenticated";
|
|
2296
|
+
const [onboarding] = (0, import_sdk6.usePersistedState)(
|
|
2297
|
+
"onboarding_data",
|
|
2298
|
+
null,
|
|
2299
|
+
{ enabled: isAuthed }
|
|
2300
|
+
);
|
|
2301
|
+
const onboardingCompleted = isAuthed && onboarding?.onboarding_completed === true;
|
|
2295
2302
|
const clearTimer = (0, import_react13.useCallback)(() => {
|
|
2296
2303
|
if (timerRef.current) {
|
|
2297
2304
|
clearTimeout(timerRef.current);
|
|
@@ -2322,6 +2329,7 @@ function DevSkipOnboardingFab({ defaults }) {
|
|
|
2322
2329
|
if (state === "error") return `failed \u2014 tap to retry`;
|
|
2323
2330
|
return hook.authStatus === "authenticated" ? "\u26A1 skip onboarding" : "\u26A1 skip + signup";
|
|
2324
2331
|
})();
|
|
2332
|
+
if (onboardingCompleted) return null;
|
|
2325
2333
|
const style = {
|
|
2326
2334
|
...STYLES.base,
|
|
2327
2335
|
...state === "confirm" || state === "error" ? STYLES.confirm : {},
|