Skip to content

Commit

Permalink
fixed dark mode issue in signup page
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourabh782 committed Nov 10, 2024
1 parent c74cdb7 commit 8208579
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
8 changes: 3 additions & 5 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ function App() {
<Cursor />
<ProjectState>
<ProfileState>
<Router>
<LoadingBar color="blue" progress={progress} onLoaderFinished={() => setProgress(0)} />
<div className="alert-container"> <Alert alert={alert} /> </div>
<ProgressBar mode={mode} />
Expand All @@ -132,7 +131,7 @@ function App() {
<Route exact path="/contributors" element={<Contributors mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path="/discussion" element={<Discussion mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path="/community" element={<Community mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path="/ai" element={ <Ai mode={mode} setProgress={setProgress} showAlert={showAlert} /> } />
{/* <Route exact path="/ai" element={ <Ai mode={mode} setProgress={setProgress} showAlert={showAlert} /> } /> */}
<Route exact path="/about" element={<About mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path="/feedback" element={<Feedback mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path="/blog" element={<BlogPage mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
Expand All @@ -146,18 +145,17 @@ function App() {
<Route exact path='/reset-password' element={<ResetPassword mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path='/codeofconduct' element={<CodeOfConduct mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path='/contactus' element={<ContactUs mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path='/myprofile' element={<MyProfile mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
{/* <Route exact path='/myprofile' element={<MyProfile mode={mode} setProgress={setProgress} showAlert={showAlert} />} /> */}
<Route exact path='/feedback' element={<Feedback mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path='/privacypolicy' element={<PrivacyPolicy mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path='/termofuse' element={<TermOfUse mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path='/uploadProject' element={<UploadProject mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path='/createBlogPost' element={<CreateBlog />} />
<Route exact path="/faq" element={ <Faq mode={mode} setProgress={setProgress} showAlert={showAlert} /> } />
{/* <Route exact path="/faq" element={ <Faq mode={mode} setProgress={setProgress} showAlert={showAlert} /> } /> */}
<Route exact path='/read-more-blog/:id' element={<ReadMoreBlog mode={mode} setProgress={setProgress} showAlert={showAlert} />} />
<Route exact path='/*' element={<NotFound />} />
</Routes>
</Layout>
</Router>
</ProfileState>
</ProjectState>
</div>
Expand Down
34 changes: 17 additions & 17 deletions client/src/component/Signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ const Signup = ({ mode }) => {
<div
className="signup-wrapper"
style={{
backgroundColor: mode === "dark" ? "black" : "white",
backgroundColor: mode === "dark" ? "black" : "#fff",
}}
>
<div
className="signup-form"
style={{
color: mode === "dark" ? "white" : "black",
color: mode === "dark" ? "#fff" : "black",
}}
>
<h2
Expand All @@ -144,12 +144,12 @@ const Signup = ({ mode }) => {

<form className="w-3/4" onSubmit={handleSubmit}>
<div className="space-y-4 w-full">
<div className="signup-form-group items-start flex flex-col gap-2">
<div className="signup-form-group items-start flex flex-col gap-2 ">
<label
htmlFor="name"
className="text-md leading-none font-medium"
className="text-md leading-none font-medium dark:text-red-600"
style={{
color: mode === "dark" ? "white" : "black",
color: mode === "dark" ? "#fff" : "black",
}}
>
Full Name
Expand All @@ -165,8 +165,8 @@ const Signup = ({ mode }) => {
autoComplete="on"
required
style={{
backgroundColor: mode === "dark" ? "#333" : "white",
color: mode === "dark" ? "white" : "black",
backgroundColor: mode === "dark" ? "#333" : "#fff",
color: mode === "dark" ? "#fff" : "black",
}}
/>
{errors.name && (
Expand All @@ -179,7 +179,7 @@ const Signup = ({ mode }) => {
htmlFor="email"
className="text-md leading-none font-medium"
style={{
color: mode === "dark" ? "white" : "black",
color: mode === "dark" ? "#fff" : "black",
}}
>
Email
Expand All @@ -195,8 +195,8 @@ const Signup = ({ mode }) => {
autoComplete="on"
required
style={{
backgroundColor: mode === "dark" ? "#333" : "white",
color: mode === "dark" ? "white" : "black",
backgroundColor: mode === "dark" ? "#333" : "#fff",
color: mode === "dark" ? "#fff" : "black",
}}
/>
{errors.email && (
Expand All @@ -209,7 +209,7 @@ const Signup = ({ mode }) => {
htmlFor="password"
className="text-md font-medium"
style={{
color: mode === "dark" ? "white" : "black",
color: mode === "dark" ? "#fff" : "black",
}}
>
Password
Expand All @@ -224,8 +224,8 @@ const Signup = ({ mode }) => {
autoComplete="on"
required
style={{
backgroundColor: mode === "dark" ? "#333" : "white",
color: mode === "dark" ? "white" : "black",
backgroundColor: mode === "dark" ? "#333" : "#fff",
color: mode === "dark" ? "#fff" : "black",
}}
iconRender={(visible) =>
visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />
Expand All @@ -248,7 +248,7 @@ const Signup = ({ mode }) => {
htmlFor="cpassword"
className="text-md font-medium"
style={{
color: mode === "dark" ? "white" : "black",
color: mode === "dark" ? "#fff" : "black",
}}
>
Confirm Password
Expand All @@ -263,8 +263,8 @@ const Signup = ({ mode }) => {
autoComplete="on"
required
style={{
backgroundColor: mode === "dark" ? "#333" : "white",
color: mode === "dark" ? "white" : "black",
backgroundColor: mode === "dark" ? "#333" : "#fff",
color: mode === "dark" ? "#fff" : "black",
}}
iconRender={(visible) =>
visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />
Expand Down Expand Up @@ -301,7 +301,7 @@ const Signup = ({ mode }) => {
</g>
<defs>
<clipPath id="clip0_17_40">
<rect width="48" height="48" fill="white" />
<rect width="48" height="48" fill="#fff" />
</clipPath>
</defs>
</svg>
Expand Down

0 comments on commit 8208579

Please sign in to comment.