From f497bfda085bfecbbc022b94aa6eda6e90520f99 Mon Sep 17 00:00:00 2001 From: Triston Armstrong Date: Sat, 12 Oct 2024 07:16:58 -0400 Subject: [PATCH] feat(text): memo infinite canvas so the toasty isnt constantly updating it --- src/App.tsx | 5 ++++- src/components/InfinateCanvas.tsx | 1 - src/styles.css | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 46d4d53..4189a94 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,3 +1,4 @@ +import { memo } from "kaioken" import InfiniteCanvas from "./components/InfinateCanvas" import { ToastContextProvider } from "./components/Toast" import { useThemeDetector } from "./utils/useThemeDetector" @@ -7,7 +8,9 @@ export function App() { return ( - + ) } + +const MemoInfyCanvas = memo(InfiniteCanvas) diff --git a/src/components/InfinateCanvas.tsx b/src/components/InfinateCanvas.tsx index 58b7452..b7976c1 100644 --- a/src/components/InfinateCanvas.tsx +++ b/src/components/InfinateCanvas.tsx @@ -8,7 +8,6 @@ import images from "../signals/images" import { CardSelector } from "./cardSelector/CardSelector" import { Logo } from "./Logo" import { useThemeDetector } from "../utils/useThemeDetector" -import { isTheme } from "../utils/isTheme" import { TextItem } from "./TextItem" import texts from "../signals/texts" diff --git a/src/styles.css b/src/styles.css index 6373614..b41f51d 100644 --- a/src/styles.css +++ b/src/styles.css @@ -11,9 +11,10 @@ margin: 0; padding: 0; box-sizing: border-box; - :focus { - outline: none; - } +} + +*:focus { + outline: none; } html {