Skip to content

Commit

Permalink
Adjusts unused files and add book view
Browse files Browse the repository at this point in the history
  • Loading branch information
thalees committed Jul 4, 2020
1 parent 6ec5ede commit 3acf09a
Show file tree
Hide file tree
Showing 77 changed files with 158 additions and 2,611 deletions.
1 change: 0 additions & 1 deletion .env.example

This file was deleted.

56 changes: 0 additions & 56 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Devias
Copyright (c) 2020 Thales Pereira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"name": "react-material-dashboard",
"author": "DeviasIO",
"email": "contact@devias.io",
"licence": "MIT",
"version": "0.3.0",
"private": false,
Expand Down
Binary file removed public/images/avatars/avatar_1.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_10.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_11.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_2.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_3.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_4.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_5.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_6.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_7.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_8.png
Binary file not shown.
Binary file removed public/images/avatars/avatar_9.png
Binary file not shown.
Binary file added public/images/avatars/fuu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/logos/book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 4 additions & 53 deletions src/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,81 +6,32 @@ import { Main as MainLayout, Minimal as MinimalLayout } from './layouts';

import {
Dashboard as DashboardView,
ProductList as ProductListView,
UserList as UserListView,
Typography as TypographyView,
Account as AccountView,
Settings as SettingsView,
SignUp as SignUpView,
SignIn as SignInView,
Bal as BalView,
Student as StudentView,
Book as BookView,
NotFound as NotFoundView
} from './views';

const Routes = () => {
return (
<Switch>
<Redirect exact from="/" to="/dashboard" />
<Redirect exact from="/" to="/student/login" />
<RouteWithLayout
component={DashboardView}
exact
layout={MainLayout}
path="/dashboard"
/>
<RouteWithLayout
component={UserListView}
exact
layout={MainLayout}
path="/users"
/>
<RouteWithLayout
component={ProductListView}
exact
layout={MainLayout}
path="/products"
/>
<RouteWithLayout
component={TypographyView}
exact
layout={MainLayout}
path="/typography"
/>
<RouteWithLayout
component={AccountView}
exact
layout={MainLayout}
path="/account"
/>
<RouteWithLayout
component={SettingsView}
exact
layout={MainLayout}
path="/settings"
/>
<RouteWithLayout
component={SignUpView}
exact
layout={MinimalLayout}
path="/sign-up"
/>
<RouteWithLayout
component={SignInView}
exact
layout={MinimalLayout}
path="/sign-in"
/>
<RouteWithLayout
component={NotFoundView}
exact
layout={MinimalLayout}
path="/not-found"
/>
<RouteWithLayout
component={BalView}
component={StudentView}
exact
layout={MinimalLayout}
path="/students/login"
path="/student/login"
/>
<RouteWithLayout
component={BookView}
Expand Down
3 changes: 0 additions & 3 deletions src/envVars.js

This file was deleted.

3 changes: 1 addition & 2 deletions src/layouts/Main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import clsx from 'clsx';
import { makeStyles, useTheme } from '@material-ui/styles';
import { useMediaQuery } from '@material-ui/core';

import { Sidebar, Topbar, Footer } from './components';
import { Sidebar, Topbar } from './components';

const useStyles = makeStyles(theme => ({
root: {
Expand Down Expand Up @@ -58,7 +58,6 @@ const Main = props => {
/>
<main className={classes.content}>
{children}
<Footer />
</main>
</div>
);
Expand Down
46 changes: 0 additions & 46 deletions src/layouts/Main/components/Footer/Footer.js

This file was deleted.

1 change: 0 additions & 1 deletion src/layouts/Main/components/Footer/index.js

This file was deleted.

45 changes: 1 addition & 44 deletions src/layouts/Main/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,9 @@ import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/styles';
import { Divider, Drawer } from '@material-ui/core';
import DashboardIcon from '@material-ui/icons/Dashboard';
import PeopleIcon from '@material-ui/icons/People';
import BookIcon from '@material-ui/icons/Book';
import ShoppingBasketIcon from '@material-ui/icons/ShoppingBasket';
import TextFieldsIcon from '@material-ui/icons/TextFields';
import ImageIcon from '@material-ui/icons/Image';
import AccountBoxIcon from '@material-ui/icons/AccountBox';
import SettingsIcon from '@material-ui/icons/Settings';
import LockOpenIcon from '@material-ui/icons/LockOpen';

import { Profile, SidebarNav, UpgradePlan } from './components';
import { Profile, SidebarNav } from './components';

const useStyles = makeStyles(theme => ({
drawer: {
Expand Down Expand Up @@ -49,41 +42,6 @@ const Sidebar = props => {
href: '/dashboard',
icon: <DashboardIcon />
},
{
title: 'Users',
href: '/users',
icon: <PeopleIcon />
},
{
title: 'Products',
href: '/products',
icon: <ShoppingBasketIcon />
},
{
title: 'Authentication',
href: '/sign-in',
icon: <LockOpenIcon />
},
{
title: 'Typography',
href: '/typography',
icon: <TextFieldsIcon />
},
{
title: 'Icons',
href: '/icons',
icon: <ImageIcon />
},
{
title: 'Account',
href: '/account',
icon: <AccountBoxIcon />
},
{
title: 'Settings',
href: '/settings',
icon: <SettingsIcon />
},
{
title: 'Books',
href: '/books',
Expand All @@ -102,7 +60,6 @@ const Sidebar = props => {
<Profile />
<Divider className={classes.divider} />
<SidebarNav className={classes.nav} pages={pages} />
<UpgradePlan />
</div>
</Drawer>
);
Expand Down
16 changes: 5 additions & 11 deletions src/layouts/Main/components/Sidebar/components/Profile/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,21 @@ const Profile = props => {
const classes = useStyles();

const user = {
name: 'Shen Zhi',
avatar: '/images/avatars/avatar_11.png',
bio: 'Brain Director'
name: localStorage.getItem('studentUsername'),
avatar: '/images/avatars/fuu.jpg',
bio: ''
};

return (
<div
{...rest}
className={clsx(classes.root, className)}
>
<div {...rest} className={clsx(classes.root, className)}>
<Avatar
alt="Person"
className={classes.avatar}
component={RouterLink}
src={user.avatar}
to="/settings"
/>
<Typography
className={classes.name}
variant="h4"
>
<Typography className={classes.name} variant="h4">
{user.name}
</Typography>
<Typography variant="body2">{user.bio}</Typography>
Expand Down
Loading

0 comments on commit 3acf09a

Please sign in to comment.