From 0fe147b302cc64086031fb7700a39e81f4864377 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sat, 17 Jan 2026 16:45:51 +0000 Subject: [PATCH] Edited Spark --- src/pages/MoleculesPage.tsx | 70 ++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/pages/MoleculesPage.tsx b/src/pages/MoleculesPage.tsx index 783b807..94826a4 100644 --- a/src/pages/MoleculesPage.tsx +++ b/src/pages/MoleculesPage.tsx @@ -1,35 +1,35 @@ -import { motion } from 'framer-motion' -import { MoleculesSection } from '@/components/molecules/MoleculesSection' -import type { Snippet } from '@/lib/types' -import { useKV } from '@github/spark/hooks' -import { useCallback } from 'react' -import { toast } from 'sonner' - -export function MoleculesPage() { - const [snippets, setSnippets] = useKV('snippets', []) - - const handleSaveSnippet = useCallback((snippetData: Omit) => { - const newSnippet: Snippet = { - ...snippetData, - id: Date.now().toString(), - createdAt: Date.now(), - updatedAt: Date.now(), - } - setSnippets((currentSnippets) => [newSnippet, ...(currentSnippets || [])]) - toast.success('Component saved as snippet!') - }, [setSnippets]) - - return ( - -
-

Molecules

-

Simple groups of atoms functioning together as a unit

-
- -
- ) -} +import { motion } from 'framer-motion' +import { MoleculesSection } from '@/components/molecules/MoleculesSection' +import type { Snippet } from '@/lib/types' +import { useKV } from '@github/spark/hooks' +import { toast } from 'sonner' +export function MoleculesPage( + + const newSnippet: Snippet = { + const [snippets, setSnippets] = useKV('snippets', []) + + const handleSaveSnippet = useCallback((snippetData: Omit) => { + const newSnippet: Snippet = { + ...snippetData, + id: Date.now().toString(), + createdAt: Date.now(), + updatedAt: Date.now(), + ret + initial={{ opacity: 0, y: 20 }} + transition={{ duration: 0.4 }} +
+ ) +}