diff options
| author | Adam <[email protected]> | 2025-11-24 20:35:51 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-11-24 20:35:51 -0600 |
| commit | 333948711d347973640211e236463a79cd5459c9 (patch) | |
| tree | 6cc26e0f27f7af4a77178845c87f75aba9f52e51 /packages/ui/src/hooks | |
| parent | 001b4be0ae19e394c584e9f2e3d0e878ae149b3c (diff) | |
| download | opencode-333948711d347973640211e236463a79cd5459c9.tar.gz opencode-333948711d347973640211e236463a79cd5459c9.zip | |
fix(desktop): content animations
Diffstat (limited to 'packages/ui/src/hooks')
| -rw-r--r-- | packages/ui/src/hooks/create-seen.ts | 20 | ||||
| -rw-r--r-- | packages/ui/src/hooks/index.ts | 1 |
2 files changed, 0 insertions, 21 deletions
diff --git a/packages/ui/src/hooks/create-seen.ts b/packages/ui/src/hooks/create-seen.ts deleted file mode 100644 index c25726e75..000000000 --- a/packages/ui/src/hooks/create-seen.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { createSignal, onCleanup, onMount } from "solid-js" -import { isServer } from "solid-js/web" - -export function createSeen(key: string, delay = 1000) { - // 1. Initialize state based on storage (default to true on server to avoid flash) - const storageKey = `app:seen:${key}` - const [hasSeen] = createSignal(!isServer && sessionStorage.getItem(storageKey) === "true") - - onMount(() => { - // 2. If we haven't seen it, mark it as seen for NEXT time - if (!hasSeen()) { - const timer = setTimeout(() => { - sessionStorage.setItem(storageKey, "true") - }, delay) - onCleanup(() => clearTimeout(timer)) - } - }) - - return hasSeen -} diff --git a/packages/ui/src/hooks/index.ts b/packages/ui/src/hooks/index.ts index 98b339cfa..7eef78091 100644 --- a/packages/ui/src/hooks/index.ts +++ b/packages/ui/src/hooks/index.ts @@ -1,2 +1 @@ export * from "./use-filtered-list" -export * from "./create-seen" |
