From ea12120c5d999edab55a768e0987649ebf312957 Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Mon, 21 Feb 2022 10:30:14 +0330 Subject: [PATCH] Admin panel started --- src/App.js | 4 +++- src/components/header/Header.js | 5 +++++ src/view/admin/index.js | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/view/admin/index.js diff --git a/src/App.js b/src/App.js index 01596e0..c7f7b22 100644 --- a/src/App.js +++ b/src/App.js @@ -1,6 +1,6 @@ import logo from './logo.svg'; 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 Header from './components/header/Header'; import Nav from './components/nav/Nav'; @@ -28,6 +28,7 @@ import ContactUs from './view/contact'; import ENTER_EXAM from './view/Exam/EnterExam/index' import EXAM from './view/Exam' import CallBack from './view/CallBack'; +import AdminPanel from './view/admin'; let data = [ @@ -680,6 +681,7 @@ function App() { /> } /> + } /> }/> } /> } /> diff --git a/src/components/header/Header.js b/src/components/header/Header.js index 75371ce..d197530 100644 --- a/src/components/header/Header.js +++ b/src/components/header/Header.js @@ -50,8 +50,11 @@ const Header = ({ : + <> + {window.location.pathname.includes('adminpanel') ?
: <>
+
avatar1
@@ -84,6 +87,8 @@ const Header = ({
+ + } } diff --git a/src/view/admin/index.js b/src/view/admin/index.js new file mode 100644 index 0000000..90e92c8 --- /dev/null +++ b/src/view/admin/index.js @@ -0,0 +1,14 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; + +const AdminPanel = () => { + return( +
+ + ورود به صفحه افزودن محصول + +
+ ) +} + +export default AdminPanel; \ No newline at end of file