mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-26 09:54:43 +10:00
fix(review): restore cookie attrs + color fallback, drop stale knip entry
Code-review findings: - donation-toast: restore path/secure/sameSite cookie attributes the inlined useCookie dropped (security/scope regression). - utils/color: restore @uiw fallback so percentage-notation rgb() still converts (custom style-rule colors are arbitrary strings); add tests pinning the one real difference vs the black fallback. - knip: drop stale npm-check-updates ignoreDependencies entry. Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa
This commit is contained in:
@@ -18,7 +18,8 @@ export function DonationToast() {
|
||||
const [dismissed, setDismissedState] = useState<string | null>(() => Cookies.get(DISMISSED_COOKIE_NAME) ?? null);
|
||||
|
||||
const setDismissed = useCallback((value: string, options?: { expires?: Date }) => {
|
||||
Cookies.set(DISMISSED_COOKIE_NAME, value, options);
|
||||
// Attributes match the former useCookie DEFAULT_COOKIE_ATTRIBUTES; options (expiry) override.
|
||||
Cookies.set(DISMISSED_COOKIE_NAME, value, { path: "/", secure: true, sameSite: "lax", ...options });
|
||||
setDismissedState(value);
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user