mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-03 10:37:21 +09:00
useIsMac started at `false` and corrected itself from an effect, which react-hooks/set-state-in-effect flags. The effect had nothing to synchronise: the platform is a constant, and this SPA never renders on a server, so there is no hydration mismatch to avoid. A lazy useState initialiser reads it during the first render instead. The only difference is the frame that is gone: on a Mac the command palette no longer paints "Ctrl+K" before switching to the correct symbol. The five remaining set-state-in-effect reports are left alone — each one buffers or resets state deliberately, and the render-phase rewrite the rule wants would change what those components commit. Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>