-
Enter your name to join:
+
+
+ Enter your name to join:
+
{
setName(e.target.value);
setModalMessage(''); // Clear error message on input change
}}
+ style={{
+ color: mode === "dark" ? "white" : "black",
+ backgroundColor: mode === "dark" ? "#444" : "white", // Adjust input background color
+ }}
onKeyDown={handleKeyDown} // Allow Enter key to submit
placeholder="Enter your name"
className="border rounded py-2 px-2 mb-3 w-full focus:outline-none focus:ring-2 focus:ring-blue-500"
/>
{modalMessage &&
{modalMessage}
}
-
+
@@ -223,9 +174,9 @@ const Login = ({mode}) => {
);
};
-// Prop Validation
Login.propTypes = {
showAlert: PropTypes.func,
+ mode: PropTypes.string.isRequired,
};
export default Login;
diff --git a/client/src/component/Share.jsx b/client/src/component/Share.jsx
index f5f6982..8c82d5d 100644
--- a/client/src/component/Share.jsx
+++ b/client/src/component/Share.jsx
@@ -1,8 +1,17 @@
+// <<<<<<< nik
+
+// import { ToastContainer, toast } from 'react-toastify';
// import 'react-toastify/dist/ReactToastify.css';
// import Share from '../assets/images/Share.png';
+// import PropTypes from 'prop-types'; // Import PropTypes
+// =======
+// // import 'react-toastify/dist/ReactToastify.css';
+// // import Share from '../assets/images/Share.png';
+// >>>>>>> main
-// const ShareComponent = (props) => {
+// // const ShareComponent = (props) => {
+// <<<<<<< nik
// return (
//
//
@@ -15,14 +24,51 @@
// Share
//
//
-// 🌐 Join the vibrant Bitbox Opensource Community today! Whether you're a seasoned developer or just starting out, there's a place for you to collaborate,
-// innovate, and make a difference. Let's shape the future of digital exchange together! #BitboxCommunity #OpenSource 🚀💻
+// 🌐 Join the vibrant Bitbox Opensource Community today! Whether you're a seasoned developer or just starting out, there's a place for you to collaborate,
+// innovate, and make a difference. Let's shape the future of digital exchange together! #BitboxCommunity #OpenSource 🚀💻
//
+//
+// Share Now
+//
//
//
//
+//
//
// );
// };
+// ShareComponent.propTypes = {
+// mode: PropTypes.string.isRequired, // Expecting 'mode' to be a string and required
+// };
+
// export default ShareComponent;
+// =======
+// // return (
+// //
+// //
+// //
+// //
+// //
+// //
+// //
+// //
+// // Share
+// //
+// //
+// // 🌐 Join the vibrant Bitbox Opensource Community today! Whether you're a seasoned developer or just starting out, there's a place for you to collaborate,
+// // innovate, and make a difference. Let's shape the future of digital exchange together! #BitboxCommunity #OpenSource 🚀💻
+// //
+// //
+// //
+// //
+// //
+// // );
+// // };
+
+// // export default ShareComponent;
+// >>>>>>> main
diff --git a/client/src/component/Signup.jsx b/client/src/component/Signup.jsx
index 5637a0a..bde16e2 100644
--- a/client/src/component/Signup.jsx
+++ b/client/src/component/Signup.jsx
@@ -1,4 +1,4 @@
-import { Eye, EyeOff, Lock, Mail, User } from "lucide-react";
+import { Eye, EyeOff} from "lucide-react";
import PropTypes from "prop-types";
import { useState } from "react";
import { Link, useNavigate } from "react-router-dom";
diff --git a/client/src/component/Verify.jsx b/client/src/component/Verify.jsx
index 41fb84d..1d544f3 100644
--- a/client/src/component/Verify.jsx
+++ b/client/src/component/Verify.jsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useState } from 'react';
+import { useEffect, useState } from 'react';
import { useParams, useNavigate } from 'react-router-dom';
const host = "http://localhost:5000";
diff --git a/client/src/component/css/Footer.css b/client/src/component/css/Footer.css
index 4d831e6..71fcd90 100644
--- a/client/src/component/css/Footer.css
+++ b/client/src/component/css/Footer.css
@@ -63,6 +63,41 @@ p {
.footer-container a:hover {
color: #0d0d0e;
}
+/* Icon styles */
+.footer-container .social a {
+ color: #0a0a0a; /* Default color for light mode */
+}
+
+.footer-container .social a:hover {
+ color: #0d0d0e; /* Hover color for light mode */
+}
+
+/* Dark mode styles */
+.footer-container.dark-mode .social a {
+ color: white; /* Icon color in dark mode */
+}
+
+.footer-container.dark-mode .social a:hover {
+ color: #cccccc; /* Lighter hover color in dark mode */
+}
+
+/* Specific icon color overrides */
+.footer-container.dark-mode .social a .FaLinkedin {
+ color: white; /* LinkedIn icon color in dark mode */
+}
+
+.footer-container.dark-mode .social a .FaTwitter {
+ color: white; /* Twitter icon color in dark mode */
+}
+
+.footer-container.dark-mode .social a .FaGithub {
+ color: white; /* GitHub icon color in dark mode */
+}
+
+.footer-container.dark-mode .social a .FaYoutube {
+ color: white; /* YouTube icon color in dark mode */
+}
+
ul {
list-style-type: none;
diff --git a/client/src/component/css/Login.css b/client/src/component/css/Login.css
index 2a0afe7..3523827 100644
--- a/client/src/component/css/Login.css
+++ b/client/src/component/css/Login.css
@@ -49,7 +49,7 @@ body{
border-bottom: 2px solid #eee;
}
.input{
- color: black;
+ color:"#000000";
border: none;
outline: none;
background: none;
@@ -59,6 +59,14 @@ body{
font-size: 17px;
}
+
+
+/*Changed this for dark-mode input toggle (by anothercoder-nik)*/
+/* .dark-mode .input {
+ color: #ffffff; /* White text for dark mode */
+/* background: #000000; /* Black background for dark mode */
+/* } */
+
.submit{
border: none;
outline: none;
diff --git a/server/Models/Profile.js b/server/Models/Profile.js
index 1589f73..573f4c9 100644
--- a/server/Models/Profile.js
+++ b/server/Models/Profile.js
@@ -6,15 +6,19 @@ const ProfileSchema = new Schema({
user: {
type: mongoose.Schema.Types.ObjectId,
ref: 'user',
+ required: true
},
image: {
image: String,
},
name: {
type: String,
+ required: true
},
email: {
type: String,
+ required: true,
+ unique: true,
},
address: {
type: String,
@@ -33,7 +37,8 @@ const ProfileSchema = new Schema({
},
password: {
type: String,
+ required: true,
},
-});
+}, { timestamps: true });
module.exports = mongoose.model('profile', ProfileSchema);
diff --git a/server/routes/projects.js b/server/routes/projects.js
index 5c115b8..68a0894 100644
--- a/server/routes/projects.js
+++ b/server/routes/projects.js
@@ -13,7 +13,9 @@ router.get('/fetchallglobalprojects',fetchallglobalprojects);
router.get('/fetchalluserprojects', fetchuser,fetchalluserprojects);
// ROUTE 3 : Add a New Project : POST: "/api/projects/addproject". Login required
-router.post('/addproject', fetchuser,addproject)
+router.post('/addproject', fetchuser, [
+ body('title', 'Title is required').not().isEmpty(),
+], addproject);
// ROUTE 4 : Update an Existing Project : PUT: "/api/projects/updateproject". Login required
router.put('/updateproject/:id', fetchuser, updateproject);
@@ -27,4 +29,4 @@ router.post('/uploadProjectImage', fetchuser, uploadProjectImage);
// ROUTE 7 : Get All User Project : GET: "/api/projects/getProjectImage". Login required
router.get('/getProjectImage', fetchuser, getProjectImage);
-module.exports = router
\ No newline at end of file
+module.exports = router