From e24e2d9874c7a9d494c7a585e279d30f9f1c1ee2 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 30 May 2024 07:59:37 +0000 Subject: [PATCH] Implemented a simple counter app with increment, decrement, and reset functionalities. The design is visually appealing and responsive. --- src/pages/Index.jsx | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/pages/Index.jsx b/src/pages/Index.jsx index 3922835..108d33f 100644 --- a/src/pages/Index.jsx +++ b/src/pages/Index.jsx @@ -1,20 +1,26 @@ -// Update this page (the content is just a fallback if you fail and example) -// Use chakra-ui -import { Container, Text, VStack } from "@chakra-ui/react"; - -// Example of using react-icons -// import { FaRocket } from "react-icons/fa"; -// } size="lg" />; // IconButton would also have to be imported from chakra +import { useState } from "react"; +import { Container, Text, VStack, Button, HStack } from "@chakra-ui/react"; const Index = () => { + const [count, setCount] = useState(0); + + const increment = () => setCount(count + 1); + const decrement = () => setCount(count - 1); + const reset = () => setCount(0); + return ( - Your Blank Canvas - Chat with the agent to start making edits. + Counter App + {count} + + + + + ); }; -export default Index; +export default Index; \ No newline at end of file