Admin panel started

main
Pedram Keshavarzi 3 years ago
parent 2bc0a72ba6
commit ea12120c5d
  1. 4
      src/App.js
  2. 5
      src/components/header/Header.js
  3. 14
      src/view/admin/index.js

@ -1,6 +1,6 @@
import logo from './logo.svg'; import logo from './logo.svg';
import './App.css'; import './App.css';
import { HashRouter as Router, Routes, Route } from "react-router-dom"; import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import Dashboard2 from './view/dashboard2/Dashboard2'; import Dashboard2 from './view/dashboard2/Dashboard2';
import Header from './components/header/Header'; import Header from './components/header/Header';
import Nav from './components/nav/Nav'; import Nav from './components/nav/Nav';
@ -28,6 +28,7 @@ import ContactUs from './view/contact';
import ENTER_EXAM from './view/Exam/EnterExam/index' import ENTER_EXAM from './view/Exam/EnterExam/index'
import EXAM from './view/Exam' import EXAM from './view/Exam'
import CallBack from './view/CallBack'; import CallBack from './view/CallBack';
import AdminPanel from './view/admin';
let data = [ let data = [
@ -680,6 +681,7 @@ function App() {
/> />
} }
/> />
<Route path="/adminpanel" element={<AdminPanel />} />
<Route path="/register" element={<Register activeLogin={activeLogin}/>}/> <Route path="/register" element={<Register activeLogin={activeLogin}/>}/>
<Route path="/accounting" element={<Accounting />} /> <Route path="/accounting" element={<Accounting />} />
<Route path="/messages" element={<Messages />} /> <Route path="/messages" element={<Messages />} />

@ -50,8 +50,11 @@ const Header = ({
</div> </div>
</Link> </Link>
</div> : </div> :
<>
{window.location.pathname.includes('adminpanel') ? <div></div> :
<> <>
<div className="header-profile h-full flex items-center"> <div className="header-profile h-full flex items-center">
<div className="header-profile-img-container w-10 h-10 bg-color2 rounded-full ml-6 overflow-hidden"> <div className="header-profile-img-container w-10 h-10 bg-color2 rounded-full ml-6 overflow-hidden">
<img src={avatar1} alt="avatar1" className='w-full' /> <img src={avatar1} alt="avatar1" className='w-full' />
</div> </div>
@ -84,6 +87,8 @@ const Header = ({
</div> </div>
</div> </div>
<div className="header-line w-px h-[90%] bg-color1 ml-6"></div> <div className="header-line w-px h-[90%] bg-color1 ml-6"></div>
</>
}
</> </>
} }

@ -0,0 +1,14 @@
import React from 'react';
import { Link } from 'react-router-dom';
const AdminPanel = () => {
return(
<div className='flex justify-center items-center w-full h-screen'>
<Link to="add-product">
ورود به صفحه افزودن محصول
</Link>
</div>
)
}
export default AdminPanel;
Loading…
Cancel
Save