Update Chatbot Page

This commit is contained in:
2025-08-04 23:51:51 +07:00
parent 64bd6d59e2
commit 886c115c52
184 changed files with 178 additions and 288809 deletions

View File

@@ -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>
);

View 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;

View File

@@ -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>

View File

@@ -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'

View File

@@ -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;