Recent
Persists the Dictionary hub's recent lookups (words and kanji) in localStorage, so the landing page can offer them back and the hub keeps a sense of state between visits.
Interfaces¶
RecentLookup¶
Defined in: src/features/dictionary/recent.ts:8
One remembered lookup.
Properties¶
| Property | Type | Defined in |
|---|---|---|
kind |
"word" | "kanji" |
src/features/dictionary/recent.ts:9 |
value |
string |
src/features/dictionary/recent.ts:10 |
Functions¶
getRecentLookups()¶
Defined in: src/features/dictionary/recent.ts:21
Reads the recent lookups, most recent first.
Returns¶
The remembered lookups (empty on parse failure).
pushRecentLookup()¶
Defined in: src/features/dictionary/recent.ts:35
Remembers a lookup, de-duplicated and capped to the most recent few.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
item |
RecentLookup |
The lookup to remember. |
Returns¶
void