From 70db43240ba52af1c44ee1cbdd116ad33e5e589d Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Mon, 30 Dec 2024 02:10:20 +0200 Subject: [PATCH] feat: memoize Home comp and reorder imports --- src/components/home.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/home.tsx b/src/components/home.tsx index 0fea48c..d777fff 100644 --- a/src/components/home.tsx +++ b/src/components/home.tsx @@ -1,11 +1,12 @@ +import { memo } from "react"; + import { ChartBarIcon, ChatBubbleLeftRightIcon, Cog6ToothIcon, FolderIcon } from "@heroicons/react/24/outline"; -import { version as reactVersion } from "react/package.json"; import { version as electronVersion } from "electron/package.json"; -import { version as typescriptVersion } from "typescript/package.json"; +import { version as reactVersion } from "react/package.json"; import { version as tailwindVersion } from "tailwindcss/package.json"; -import { memo } from "react"; +import { version as typescriptVersion } from "typescript/package.json"; -export const Home: React.FC = () => { +export const Home: React.FC = memo(function Home() { return (
@@ -66,7 +67,7 @@ export const Home: React.FC = () => {
); -}; +}); const TechCard: React.FC<{ title: string;