From 8c305576dfd19468363122ace8694b3d5470aa4b Mon Sep 17 00:00:00 2001 From: manikumarreddyu <133508962+manikumarreddyu@users.noreply.github.com> Date: Fri, 21 Jun 2024 00:53:21 +0530 Subject: [PATCH 01/10] first --- frontend/src/App.tsx | 210 +++++------ frontend/src/components/FAQ.tsx | 17 +- frontend/src/components/Features.tsx | 61 ++-- frontend/src/components/Navbar.tsx | 85 ++--- frontend/src/components/PostCard.tsx | 27 +- frontend/src/components/Showcase.tsx | 11 +- frontend/src/components/TestimonialSlider.tsx | 21 +- frontend/src/hooks/useTheme.tsx | 29 ++ frontend/src/pages/About.tsx | 10 +- frontend/src/pages/Comment.tsx | 12 +- frontend/src/pages/ContactUs.tsx | 24 +- frontend/src/pages/Favorite.tsx | 42 ++- frontend/src/pages/Home.tsx | 8 +- frontend/src/pages/HomePagePosts.tsx | 9 +- frontend/src/pages/LeaderBoard.tsx | 108 +++--- frontend/src/pages/Policy.tsx | 4 +- frontend/src/pages/Profile.tsx | 97 +++--- frontend/src/pages/ShowProfile.tsx | 12 +- frontend/src/pages/Signin.tsx | 145 ++++---- frontend/src/pages/Signup.tsx | 325 +++++++++--------- frontend/tailwind.config.js | 1 + 21 files changed, 655 insertions(+), 603 deletions(-) create mode 100644 frontend/src/hooks/useTheme.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index e9525e7a..ca95a074 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -25,120 +25,124 @@ import LeaderBoard from "./pages/LeaderBoard"; import CustomizeWithAi from "./pages/CustomizeWithAi"; import ScrollToTopWhenRouteChanges from "./components/ScrollToTopWhenRouteChanges"; import './i18n'; -import CodeEditor from "./pages/CodeEditor"; import ShowProfile from "./pages/ShowProfile"; import { Tooltip } from 'react-tooltip' import EditPost from "./pages/EditPost"; -// import axios from "axios"; -// axios.defaults.baseURL = "http://localhost:3001/"; +import useTheme from './hooks/useTheme'; +import axios from "axios"; +import CodeEditor from "./pages/CodeEditor"; +axios.defaults.baseURL = "http://localhost:3001/"; function App() { - + const { theme, toggleTheme } = useTheme(); return ( }> - + - -
- - } /> - } /> - } /> - } /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - } - /> - - - - } - /> - - } - /> - - } - /> - - } - /> - } /> - +
+ + +
+ + } /> + } /> + } /> + } /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + } + /> + + + + } + /> + + } + /> + + } + /> + + } + /> + } /> + +
+
-