diff --git a/src/components/tool-settings/History.tsx b/src/components/tool-settings/History.tsx index b75e91e..49e4e00 100644 --- a/src/components/tool-settings/History.tsx +++ b/src/components/tool-settings/History.tsx @@ -1,6 +1,17 @@ -import { useContext } from "react"; +import { useContext, useEffect, useRef } from "react"; import { HistoryContext } from "@/context/History"; import { ScrollArea } from "@/components/ui/scroll-area"; +import { BombIcon, EraserIcon, PencilIcon, PresentationIcon, SquareDashedIcon, Trash2Icon, WandIcon } from "lucide-react"; + +const iconMap = { + "New Canvas": PresentationIcon, + Pencil: PencilIcon, + Eraser: EraserIcon, + "Rectangle Select": SquareDashedIcon, + "Magic Wand": WandIcon, + "Clear All": BombIcon, + Delete: Trash2Icon, +}; function History() { const { history, currentIndex, jumpTo } = useContext(HistoryContext); @@ -8,20 +19,25 @@ function History() { return (
- {history.map(({ name }, index) => ( - - ))} + > + {IconComponent && } + {name} + + ); + })}
);