parent
e5550292bf
commit
deb6e1fbcd
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"nuxt.isNuxtApp": false
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -1,38 +1,4 @@
|
|||||||
.App {
|
a {
|
||||||
text-align: center;
|
text-decoration: none;
|
||||||
}
|
color: inherit;
|
||||||
|
|
||||||
.App-logo {
|
|
||||||
height: 40vmin;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: no-preference) {
|
|
||||||
.App-logo {
|
|
||||||
animation: App-logo-spin infinite 20s linear;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.App-header {
|
|
||||||
background-color: #282c34;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: calc(10px + 2vmin);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.App-link {
|
|
||||||
color: #61dafb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes App-logo-spin {
|
|
||||||
from {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,8 +0,0 @@
|
|||||||
import { render, screen } from '@testing-library/react';
|
|
||||||
import App from './App';
|
|
||||||
|
|
||||||
test('renders learn react link', () => {
|
|
||||||
render(<App />);
|
|
||||||
const linkElement = screen.getByText(/learn react/i);
|
|
||||||
expect(linkElement).toBeInTheDocument();
|
|
||||||
});
|
|
@ -0,0 +1,26 @@
|
|||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import MainNavItem from "./MainNavItem";
|
||||||
|
import HomeIcon from '@mui/icons-material/Home';
|
||||||
|
const MainNav = () => {
|
||||||
|
const navItems = [
|
||||||
|
{
|
||||||
|
text: 'Home',
|
||||||
|
path: '/',
|
||||||
|
icon: HomeIcon
|
||||||
|
}
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
navItems.map((navItem, i) => {
|
||||||
|
return (
|
||||||
|
<Link to={navItem.path} key={i}>
|
||||||
|
<MainNavItem text={navItem.text} icon={navItem.icon} />
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div >
|
||||||
|
)
|
||||||
|
};
|
||||||
|
export default MainNav;
|
@ -0,0 +1,5 @@
|
|||||||
|
.main__nav__item {
|
||||||
|
.main__nav__item--text span {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import { ListItemButton, ListItemText, ListItemIcon } from '@mui/material';
|
||||||
|
import styles from './MainNav.module.scss';
|
||||||
|
|
||||||
|
const MainNavItem = ({ text, path, icon }) => {
|
||||||
|
const MainNavItemIcon = icon;
|
||||||
|
return (
|
||||||
|
<ListItemButton className={styles.main__nav__item} href={path}>
|
||||||
|
<ListItemIcon className="main__nav__item--icon" sx={{ 'min-width': '30px' }}>
|
||||||
|
<MainNavItemIcon fontSize="large" />
|
||||||
|
</ListItemIcon>
|
||||||
|
<ListItemText className="main__nav__item--text" primary={text} />
|
||||||
|
</ListItemButton>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MainNavItem;
|
@ -1,17 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import ReactDOM from 'react-dom/client';
|
|
||||||
import './index.css';
|
|
||||||
import App from './App';
|
|
||||||
import reportWebVitals from './reportWebVitals';
|
|
||||||
|
|
||||||
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
||||||
root.render(
|
|
||||||
<React.StrictMode>
|
|
||||||
<App />
|
|
||||||
</React.StrictMode>
|
|
||||||
);
|
|
||||||
|
|
||||||
// If you want to start measuring performance in your app, pass a function
|
|
||||||
// to log results (for example: reportWebVitals(console.log))
|
|
||||||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
||||||
reportWebVitals();
|
|
@ -0,0 +1,19 @@
|
|||||||
|
import React, { StrictMode } from 'react';
|
||||||
|
import ReactDOM from 'react-dom/client';
|
||||||
|
import './index.css';
|
||||||
|
import App from './App';
|
||||||
|
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
||||||
|
import Dashboard from "./views/dashboard/Dashboard";
|
||||||
|
|
||||||
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
||||||
|
root.render(
|
||||||
|
<StrictMode>
|
||||||
|
<BrowserRouter>
|
||||||
|
<Routes>
|
||||||
|
<Route path="/" element={<App />}>
|
||||||
|
<Route index element={<Dashboard />} />
|
||||||
|
</Route>
|
||||||
|
</Routes>
|
||||||
|
</BrowserRouter>
|
||||||
|
</StrictMode>
|
||||||
|
);
|
Before Width: | Height: | Size: 2.6 KiB |
@ -1,13 +0,0 @@
|
|||||||
const reportWebVitals = onPerfEntry => {
|
|
||||||
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
||||||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
||||||
getCLS(onPerfEntry);
|
|
||||||
getFID(onPerfEntry);
|
|
||||||
getFCP(onPerfEntry);
|
|
||||||
getLCP(onPerfEntry);
|
|
||||||
getTTFB(onPerfEntry);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default reportWebVitals;
|
|
@ -1,5 +0,0 @@
|
|||||||
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
||||||
// allows you to do things like:
|
|
||||||
// expect(element).toHaveTextContent(/react/i)
|
|
||||||
// learn more: https://github.com/testing-library/jest-dom
|
|
||||||
import '@testing-library/jest-dom';
|
|
@ -0,0 +1,7 @@
|
|||||||
|
const Dashboard = () => (
|
||||||
|
<div className="App">
|
||||||
|
dashboard
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default Dashboard;
|
Loading…
Reference in new issue