diff --git a/oathfiles.txt b/oathfiles.txt new file mode 100644 index 0000000..8c53976 --- /dev/null +++ b/oathfiles.txt @@ -0,0 +1,2 @@ +dev-eydbckiq4wqvn7iy.us.auth0.com +LslJwFqrmO90hmUV4K4v2Yg63nq4QjNU \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ec87282..72f1c1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "securesure", "version": "0.0.0", "dependencies": { + "@auth0/auth0-react": "^2.2.4", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^6.1.6", @@ -20,6 +21,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.28.0", + "securesure": "file:", "web3": "^4.15.0" }, "devDependencies": { @@ -71,6 +73,25 @@ "node": ">=6.0.0" } }, + "node_modules/@auth0/auth0-react": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@auth0/auth0-react/-/auth0-react-2.2.4.tgz", + "integrity": "sha512-l29PQC0WdgkCoOc6WeMAY26gsy/yXJICW0jHfj0nz8rZZphYKrLNqTRWFFCMJY+sagza9tSgB1kG/UvQYgGh9A==", + "license": "MIT", + "dependencies": { + "@auth0/auth0-spa-js": "^2.1.3" + }, + "peerDependencies": { + "react": "^16.11.0 || ^17 || ^18", + "react-dom": "^16.11.0 || ^17 || ^18" + } + }, + "node_modules/@auth0/auth0-spa-js": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@auth0/auth0-spa-js/-/auth0-spa-js-2.1.3.tgz", + "integrity": "sha512-NMTBNuuG4g3rame1aCnNS5qFYIzsTUV5qTFPRfTyYFS1feS6jsCBR+eTq9YkxCp1yuoM2UIcjunPaoPl77U9xQ==", + "license": "MIT" + }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", @@ -6245,6 +6266,10 @@ "loose-envify": "^1.1.0" } }, + "node_modules/securesure": { + "resolved": "", + "link": true + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", diff --git a/package.json b/package.json index 542213b..4a6e585 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@auth0/auth0-react": "^2.2.4", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@mui/icons-material": "^6.1.6", @@ -22,6 +23,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.28.0", + "securesure": "file:", "web3": "^4.15.0" }, "devDependencies": { diff --git a/src/App.jsx b/src/App.jsx index 9f111fa..7930c88 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,9 +3,12 @@ import LandingPage from './components/LandingPage'; import AdminPage from './components/AdminPage'; import HospitalDashboard from './components/HospitalDashboard'; import CompanyDashboard from './components/CompanyDasboard'; + +import Login from './components/Login' import UserDashboard from './components/UserDashboard'; import ClaimSubmit from './components/ClaimSubmit'; + const App = () => ( @@ -13,8 +16,10 @@ const App = () => ( } /> } /> } /> + } /> } /> } /> + ); diff --git a/src/components/LandingPage.jsx b/src/components/LandingPage.jsx index 8e1a2ea..f88825d 100644 --- a/src/components/LandingPage.jsx +++ b/src/components/LandingPage.jsx @@ -1,63 +1,77 @@ import React from 'react'; import { Shield, Lock, Clock, Check, ChevronRight, Database, AlertCircle } from 'lucide-react'; import { motion } from 'framer-motion'; +import { useNavigate } from 'react-router-dom'; // Import useNavigate const LandingPage = () => { - return ( -
- + const navigate = useNavigate(); // Hook for navigation -
-
- -

- Decentralized Smart Insurance - Claim Processing -

-

- Leverage the power of Web3 and Generative AI for transparent, fraud-resistant insurance claims processing. -

-
- - Get Started - - - Learn More - -
-
-
-
+ return ( +
+ + +
+
+ +

+ Decentralized Smart Insurance + Claim Processing +

+

+ Leverage the power of Web3 and Generative AI for transparent, fraud-resistant insurance claims processing. +

+
+ navigate('/login')} // Redirect to the login page + > + Get Started + + + Learn More + +
+
+
+
diff --git a/src/components/Login.css b/src/components/Login.css new file mode 100644 index 0000000..8df0622 --- /dev/null +++ b/src/components/Login.css @@ -0,0 +1,23 @@ +.login-container { + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + background-color: #f0f4f8; /* Light background for better contrast */ + } + + .login-button { + background-color: #1e40af; /* Tailwind's blue-700 */ + color: white; + padding: 12px 24px; + border: none; + border-radius: 8px; + font-size: 16px; + cursor: pointer; + transition: background-color 0.3s; + } + + .login-button:hover { + background-color: #1d4ed8; /* Tailwind's blue-800 */ + } + \ No newline at end of file diff --git a/src/components/Login.jsx b/src/components/Login.jsx new file mode 100644 index 0000000..74000d9 --- /dev/null +++ b/src/components/Login.jsx @@ -0,0 +1,23 @@ +import { useAuth0 } from '@auth0/auth0-react'; + + +function Login() { + const { user, loginWithRedirect } = useAuth0(); + + console.log("Current User:", user); + + return ( +
+
+ +
+
+ ); +} + +export default Login; \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx index b9a1a6d..581d023 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -1,10 +1,21 @@ import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' +import { Auth0Provider } from '@auth0/auth0-react'; import './index.css' import App from './App.jsx' createRoot(document.getElementById('root')).render( + + - - , -) + + +, +); +