From d01be31a42b392e603d1361b6c886defc7e4764f Mon Sep 17 00:00:00 2001 From: OrcDev Date: Wed, 27 Aug 2025 11:09:44 +0200 Subject: [PATCH 1/2] refactor: replace lucide-react icons with SVGs in various components for improved performance and consistency --- app/blocks/charts/charts.tsx | 134 +++++++++++++++- app/docs/components/command/page.tsx | 38 +---- components/examples/command.tsx | 42 +---- components/examples/component-showcase.tsx | 109 ++++++++++--- components/ui/8bit/blocks/game-over.tsx | 170 ++++++++++++++++++++- components/ui/8bit/blocks/main-menu.tsx | 7 +- 6 files changed, 394 insertions(+), 106 deletions(-) diff --git a/app/blocks/charts/charts.tsx b/app/blocks/charts/charts.tsx index bb0a8e6a..641152bd 100644 --- a/app/blocks/charts/charts.tsx +++ b/app/blocks/charts/charts.tsx @@ -1,5 +1,3 @@ -import { Users } from "lucide-react"; - import { ChartExample } from "@/components/ui/8bit/blocks/chart"; import ChartAreaStep from "@/components/ui/8bit/blocks/chart-area-step"; import ChartBarMultiple from "@/components/ui/8bit/blocks/chart-bar"; @@ -36,7 +34,49 @@ export default function ChartsBlocks() { Total visitors in the last 6 months - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -64,7 +104,49 @@ export default function ChartsBlocks() { Total visitors in the last 6 months - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -92,7 +174,49 @@ export default function ChartsBlocks() { Total visitors in the last 6 months - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/docs/components/command/page.tsx b/app/docs/components/command/page.tsx index e9851af6..b31da941 100644 --- a/app/docs/components/command/page.tsx +++ b/app/docs/components/command/page.tsx @@ -65,14 +65,6 @@ export default function CommandPage() { {`"use client" import * as React from "react" -import { - Calculator, - Calendar, - CreditCard, - Settings, - Smile, - User, -} from "lucide-react" import { Command, @@ -89,28 +81,19 @@ const suggestionCommands = [ { value: "Calendar", symbol: ( - <> - - Calendar - + Calendar ), }, { value: "Search Emoji", symbol: ( - <> - - Search Emoji - + Search Emoji ), }, { value: "Calculator", symbol: ( - <> - - Calculator - + Calculator ), }, ] @@ -119,30 +102,21 @@ const settingCommands = [ { value: "Profile", symbol: ( - <> - - Profile - + Profile ), shortcut: "⌘P", }, { value: "Billing", symbol: ( - <> - - Billing - + Billing ), shortcut: "⌘B", }, { value: "Settings", symbol: ( - <> - - Settings - + Settings ), shortcut: "⌘S", }, diff --git a/components/examples/command.tsx b/components/examples/command.tsx index 3befc186..301ba059 100644 --- a/components/examples/command.tsx +++ b/components/examples/command.tsx @@ -25,62 +25,32 @@ import { const suggestionCommands = [ { value: "Calendar", - symbol: ( - <> - - Calendar - - ), + symbol: Calendar, }, { value: "Search Emoji", - symbol: ( - <> - - Search Emoji - - ), + symbol: Search Emoji, }, { value: "Calculator", - symbol: ( - <> - - Calculator - - ), + symbol: Calculator, }, ]; const settingCommands = [ { value: "Profile", - symbol: ( - <> - - Profile - - ), + symbol: Profile, shortcut: "⌘P", }, { value: "Billing", - symbol: ( - <> - - Billing - - ), + symbol: Billing, shortcut: "⌘B", }, { value: "Settings", - symbol: ( - <> - - Settings - - ), + symbol: Settings, shortcut: "⌘S", }, ]; diff --git a/components/examples/component-showcase.tsx b/components/examples/component-showcase.tsx index aa8ae021..bd016706 100644 --- a/components/examples/component-showcase.tsx +++ b/components/examples/component-showcase.tsx @@ -1,12 +1,3 @@ -import { - Activity, - AlertTriangle, - Info, - Sword, - Users, - Wand, -} from "lucide-react"; - import { Alert, AlertDescription, @@ -50,7 +41,6 @@ export default function ComponentShowcase() { - Info Your game progress has been saved successfully. @@ -58,7 +48,6 @@ export default function ComponentShowcase() { - Warning Low health! Find a health potion quickly. @@ -68,7 +57,41 @@ export default function ComponentShowcase() { Active Now - + + + + + + + + + + + + + + + + + + + + + + + + +
+573
@@ -81,7 +104,49 @@ export default function ComponentShowcase() { Subscriptions - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+2350
@@ -215,19 +280,19 @@ export default function ComponentShowcase() { Game Options -
+
-
+
-
+
-
+
@@ -235,27 +300,25 @@ export default function ComponentShowcase() { - + Warriors -
+100

- +100 since last month + +42% since last month

- + Wizards -
+1000

- +1000 since last month + +31% since last month

diff --git a/components/ui/8bit/blocks/game-over.tsx b/components/ui/8bit/blocks/game-over.tsx index 8e6d019c..26ca15c7 100644 --- a/components/ui/8bit/blocks/game-over.tsx +++ b/components/ui/8bit/blocks/game-over.tsx @@ -1,5 +1,3 @@ -import { RefreshCcw, X } from "lucide-react"; - import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/8bit/button"; @@ -22,11 +20,175 @@ export default function GameOver({
diff --git a/components/ui/8bit/blocks/main-menu.tsx b/components/ui/8bit/blocks/main-menu.tsx index 7c040180..40f44f57 100644 --- a/components/ui/8bit/blocks/main-menu.tsx +++ b/components/ui/8bit/blocks/main-menu.tsx @@ -14,25 +14,21 @@ import { const menuItems = [ { label: "START GAME", - icon: Play, action: () => console.log("Starting game..."), }, { label: "OPTIONS", - icon: Settings, action: () => console.log("Showing options..."), }, { label: "HIGH SCORES", - icon: Trophy, action: () => console.log("Showing high scores..."), }, { label: "MULTIPLAYER", - icon: Users, action: () => console.log("Multiplayer mode..."), }, - { label: "QUIT", icon: Power, action: () => console.log("Quitting game...") }, + { label: "QUIT", action: () => console.log("Quitting game...") }, ]; export default function MainMenu({ @@ -49,7 +45,6 @@ export default function MainMenu({
{menuItems.map((item) => ( ))} From 55b2920f553dbeda450833b894bd8f872891fdd8 Mon Sep 17 00:00:00 2001 From: OrcDev Date: Wed, 27 Aug 2025 11:10:06 +0200 Subject: [PATCH 2/2] refactor: remove unused lucide-react icons from main menu component --- components/ui/8bit/blocks/main-menu.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/ui/8bit/blocks/main-menu.tsx b/components/ui/8bit/blocks/main-menu.tsx index 40f44f57..3f612076 100644 --- a/components/ui/8bit/blocks/main-menu.tsx +++ b/components/ui/8bit/blocks/main-menu.tsx @@ -1,5 +1,3 @@ -import { Play, Power, Settings, Trophy, Users } from "lucide-react"; - import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/8bit/button";