@devries-cameron20 / t3code Mirror · read-only / commits / 3603057fe4
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 06:45 UTC

perf(web): the onboarding completion hook compiles without manual memoization (#20561)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 16, 2026 at 22:07 UTC 3603057fe437658c6d427e587f25688b6114a317
1 file changed +7 -7
apps/web/src/onboarding/firstRun.ts
+7 -7
@@ -1,11 +1,11 @@
1 -import { useCallback } from "react";
2 -
1 import { ensureClientSettingsHydrated, persistClientSettingsUpdate } from "../hooks/useSettings";
2
3 +async function completeOnboarding(): Promise<void> {
4 + await ensureClientSettingsHydrated();
5 + const onboardingCompletedAt = new Date().toISOString();
6 + await persistClientSettingsUpdate((current) => ({ ...current, onboardingCompletedAt }));
7 +}
8 +
9 export function useCompleteOnboarding(): () => Promise<void> {
6 - return useCallback(async () => {
7 - await ensureClientSettingsHydrated();
8 - const onboardingCompletedAt = new Date().toISOString();
9 - await persistClientSettingsUpdate((current) => ({ ...current, onboardingCompletedAt }));
10 - }, []);
10 + return completeOnboarding;
11 }