customSelect("Home")}
>
@@ -73,15 +115,24 @@ const MarketPlaceSideBar = () => {
-
Home
+
+ Home
+
customSelect("Purchase")}
>
@@ -105,15 +156,24 @@ const MarketPlaceSideBar = () => {
-
Purchase Orders
+
+ Purchase Orders
+
customSelect("Quotes")}
>
@@ -137,15 +197,24 @@ const MarketPlaceSideBar = () => {
-
Quotations
+
+ Quotations
+
customSelect("Favorite")}
>
@@ -158,14 +227,23 @@ const MarketPlaceSideBar = () => {
>
-
Favorites
+
+ Favorites
+
customSelect("Profile")}
>
@@ -180,15 +258,23 @@ const MarketPlaceSideBar = () => {
fill-rule="evenodd"
clip-rule="evenodd"
d="M12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4ZM14 8C14 6.9 13.1 6 12 6C10.9 6 10 6.9 10 8C10 9.1 10.9 10 12 10C13.1 10 14 9.1 14 8ZM18 17C17.8 16.29 14.7 15 12 15C9.3 15 6.2 16.29 6 17.01V18H18V17ZM4 17C4 14.34 9.33 13 12 13C14.67 13 20 14.34 20 17V20H4V17Z"
- fill={id === "Profile" ? "#f0f0f0": "#002629"}
+ fill={id === "Profile" ? "#f0f0f0" : "#002629"}
/>
-
Profiles
+
+ Profiles
+
-
+
-
Settings
+
+ Settings
+
-
+
-
Support
+
+ Support
+
-
diff --git a/cubeseed_login/src/pages/login_page/login-page.tsx b/cubeseed_login/src/pages/login_page/login-page.tsx
index b5f9e00..8db4053 100644
--- a/cubeseed_login/src/pages/login_page/login-page.tsx
+++ b/cubeseed_login/src/pages/login_page/login-page.tsx
@@ -1,81 +1,65 @@
-// import React from 'react';
-
-// const LoginPage = () => {
-// return (
-//
-//
Login Page
-// {/* Add your login form and other components here */}
-//
-// );
-// };
-
-// export default LoginPage;
-
-import React, { useState } from "react";
-import { useRouter } from "next/router";
-import Link from "next/link";
-import Image from "next/image";
-// import { AiFillGoogleCircle } from "react-icons/ai";
-// import { BsFacebook } from "react-icons/bs";
-// import { AiFillTwitterCircle } from "react-icons/ai";
-import loginoptions from "@/assets/loginoptions.png";
-import logo from "@/assets/cubeseed.png";
-import styles from "@/styles/loginpage.module.scss";
+import React, { useState } from "react"
+import { useRouter } from "next/router"
+import Link from "next/link"
+import Image from "next/image"
+import loginoptions from "@assets/loginoptions.png"
+import logo from "@assets/cubeseed.png"
+import styles from "@/styles/loginpage.module.scss"
interface LoginFormProps {
- onSubmit: (email: string, password: string, rememberMe: boolean) => void;
- onForgotPassword: () => void;
+ onSubmit: (email: string, password: string, rememberMe: boolean) => void
+ onForgotPassword: () => void
}
const LoginPage: React.FC
= ({
onSubmit,
onForgotPassword,
}) => {
- const [email, setEmail] = useState("");
- const [password, setPassword] = useState("");
- const [rememberMe, setRememberMe] = useState(false);
- const [emailError, setEmailError] = useState("");
- const [passwordError, setPasswordError] = useState("");
- const router = useRouter();
+ const [email, setEmail] = useState("")
+ const [password, setPassword] = useState("")
+ const [rememberMe, setRememberMe] = useState(false)
+ const [emailError, setEmailError] = useState("")
+ const [passwordError, setPasswordError] = useState("")
+ const router = useRouter()
const handleLogin = () => {
if (email === "") {
- setEmailError("Please enter valid email address");
+ setEmailError("Please enter valid email address")
} else {
- setEmailError("");
+ setEmailError("")
}
if (password === "") {
- setPasswordError("Wrong password");
+ setPasswordError("Wrong password")
} else {
- setPasswordError("");
+ setPasswordError("")
}
// if (email !== '' && password !== '') {
// // Perform login logic
// router.push('/farm-verification');
// }
- };
+ }
const handleEmailChange = (event: React.ChangeEvent) => {
- setEmail(event.target.value);
- };
+ setEmail(event.target.value)
+ }
const handlePasswordChange = (event: React.ChangeEvent) => {
- setPassword(event.target.value);
- };
+ setPassword(event.target.value)
+ }
const handleRememberMeChange = (
event: React.ChangeEvent
) => {
- setRememberMe(event.target.checked);
- };
+ setRememberMe(event.target.checked)
+ }
const handleSubmit = (event: React.FormEvent) => {
- event.preventDefault();
+ event.preventDefault()
//onSubmit(email, password, rememberMe);
- login(email, password);
- };
+ login(email, password)
+ }
const login = async (username: string, password: string) => {
try {
@@ -86,23 +70,23 @@ const LoginPage: React.FC = ({
"Content-Type": "application/json",
},
body: JSON.stringify({ username, password }),
- });
+ })
if (response.ok) {
- const data = await response.json();
+ const data = await response.json()
// Login successful
// Redirect the user to the desired page or perform any other actions
- console.log("Login successful:", data);
+ console.log("Login successful:", data)
} else {
// Login failed
// Handle the error, e.g., show an error message to the user
- console.log("Login failed");
+ console.log("Login failed")
}
} catch (error) {
// Handle network errors or other exceptions
- console.error("Login failed", error);
+ console.error("Login failed", error)
}
- };
+ }
return (
@@ -212,7 +196,7 @@ const LoginPage: React.FC = ({
- );
-};
+ )
+}
-export default LoginPage;
+export default LoginPage
diff --git a/cubeseed_login/src/pages/redirect_page/redirect-page.tsx b/cubeseed_login/src/pages/redirect_page/redirect-page.tsx
index b9f087f..be62518 100644
--- a/cubeseed_login/src/pages/redirect_page/redirect-page.tsx
+++ b/cubeseed_login/src/pages/redirect_page/redirect-page.tsx
@@ -1,44 +1,42 @@
import styles from "@/styles/redirectpage.module.scss"
-import logo from "@/assets/cubeseed.png";
-import Image from 'next/image';
+import logo from "@assets/cubeseed.png"
+import Image from "next/image"
const RedirectPage = () => {
- return (
-
-
-
-
-
-
-
-
Hange Tight!
-
-
-
-
-
-
- Redirecting to Google
-
-
- This will only take a moment...
-
-
-
-
-
+ return (
+
+
+
+
+
+
+
+
Hange Tight!
+
+
+
+
+
+
Redirecting to Google
+
+ This will only take a moment...
+
+
+
- )
+
+
+ )
}
-export default RedirectPage;
\ No newline at end of file
+export default RedirectPage
diff --git a/cubeseed_login/src/styles/carousel.module.scss b/cubeseed_login/src/styles/carousel.module.scss
index abd5470..67fb376 100644
--- a/cubeseed_login/src/styles/carousel.module.scss
+++ b/cubeseed_login/src/styles/carousel.module.scss
@@ -1,37 +1,35 @@
.carousel {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-image: url("../../public/assets/mock.jpeg");
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: contain;
+
+ .card {
display: flex;
justify-content: center;
- align-items: center;
- background-image: url('../assets/mock.jpeg');
- background-repeat: no-repeat;
- background-position: center;
- background-size: contain;
-
- .card {
- display: flex;
- justify-content: center;
- align-items: flex-start;
- flex-direction: column;
- padding: 20px;
- width: 431px;
- height: 332px;
- background: rgba(0, 38, 41, 0.7);
- //background: #05656B;
- color: white;
- box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
- backdrop-filter: blur(1px);
- -webkit-backdrop-filter: blur(1px);
- border-radius: 10px;
+ align-items: flex-start;
+ flex-direction: column;
+ padding: 20px;
+ width: 431px;
+ height: 332px;
+ background: rgba(0, 38, 41, 0.7);
+ //background: #05656B;
+ color: white;
+ box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
+ backdrop-filter: blur(1px);
+ -webkit-backdrop-filter: blur(1px);
+ border-radius: 10px;
- .profile{
- display: flex;
- justify-content: flex-start;
- align-items: center;
- flex-direction: row;
- gap: 30px;
- padding: 15px 0px;
- }
+ .profile {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ flex-direction: row;
+ gap: 30px;
+ padding: 15px 0px;
}
-
-
-}
\ No newline at end of file
+ }
+}
diff --git a/cubeseed_login/tsconfig.json b/cubeseed_login/tsconfig.json
index 89b003f..bc71357 100644
--- a/cubeseed_login/tsconfig.json
+++ b/cubeseed_login/tsconfig.json
@@ -14,9 +14,11 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
+ "baseUrl": "./",
"paths": {
- "@/*": ["./src/*"],
- "@cs/*": ["./*"]
+ "@/*": ["src/*"],
+ "@cs/*": ["./*"],
+ "@assets/*": ["public/assets/*"]
},
"plugins": [
{