Update Chatbot Page
This commit is contained in:
707
adventure-rental-app/package-lock.json
generated
707
adventure-rental-app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@
|
||||
"@eslint/js": "^9.30.1",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"@vitejs/plugin-react": "^4.6.0",
|
||||
"@vitejs/plugin-react": "^4.3.1",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"eslint": "^9.30.1",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
@@ -28,6 +28,6 @@
|
||||
"globals": "^16.3.0",
|
||||
"postcss": "^8.5.6",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"vite": "^7.0.4"
|
||||
"vite": "^4.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
||||
import AuthPage from './AuthPage';
|
||||
import ChatbotPage from './ChatbotPage';
|
||||
import AuthPage from './pages/AuthPage';
|
||||
import ChatbotPage from './pages/ChatbotPage';
|
||||
import DashboardLayout from './layouts/DashboardLayout';
|
||||
import DashboardOverview from './pages/dashboard/DashboardOverview';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
@@ -8,6 +10,7 @@ function App() {
|
||||
<Routes>
|
||||
<Route path="/admin" element={<AuthPage />} />
|
||||
<Route path="/" element={<ChatbotPage />} />
|
||||
<Route path="/dashboard" element={<DashboardLayout><DashboardOverview /></DashboardLayout>} />
|
||||
</Routes>
|
||||
</Router>
|
||||
);
|
||||
|
||||
19
adventure-rental-app/src/layouts/DashboardLayout.jsx
Normal file
19
adventure-rental-app/src/layouts/DashboardLayout.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
|
||||
const DashboardLayout = ({ children }) => {
|
||||
return (
|
||||
<div className="flex h-screen bg-gray-100">
|
||||
<div className="w-64 bg-gray-800 text-white">
|
||||
{/* Sidebar */}
|
||||
<div className="p-4">
|
||||
<h1 className="text-2xl font-bold">Admin</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-1 p-10">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DashboardLayout;
|
||||
@@ -1,7 +1,7 @@
|
||||
import { StrictMode } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import './index.css'
|
||||
import App from './App.jsx'
|
||||
import App from './App.jsx';
|
||||
|
||||
createRoot(document.getElementById('root')).render(
|
||||
<StrictMode>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, { useState, useCallback } from 'react';
|
||||
import LoginForm from './LoginForm';
|
||||
import SignupForm from './SignupForm';
|
||||
import OtpForm from './OtpForm';
|
||||
import ForgotPasswordForm from './ForgotPasswordForm';
|
||||
import ResetPasswordForm from './ResetPasswordForm';
|
||||
import LoginForm from '../components/auth/LoginForm';
|
||||
import SignupForm from '../components/auth/SignupForm';
|
||||
import OtpForm from '../components/auth/OtpForm';
|
||||
import ForgotPasswordForm from '../components/auth/ForgotPasswordForm';
|
||||
import ResetPasswordForm from '../components/auth/ResetPasswordForm';
|
||||
|
||||
const AuthPage = () => {
|
||||
const [view, setView] = useState('login'); // 'login', 'signup', 'otp', 'forgotPassword', 'resetPassword'
|
||||
@@ -0,0 +1,12 @@
|
||||
import React from 'react';
|
||||
|
||||
const DashboardOverview = () => {
|
||||
return (
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold">Dashboard Overview</h1>
|
||||
<p>Welcome to the admin dashboard.</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DashboardOverview;
|
||||
Reference in New Issue
Block a user