Skip to content

Commit

Permalink
chore: cascade changes to root of /src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieSlome committed Nov 7, 2023
1 parent 0d67262 commit 37d37ef
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 25 deletions.
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"dependencies": {
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "4.11.3",
"@primer/octicons-react": "^19.8.0",
"@seald-io/nedb": "^4.0.2",
"axios": "^1.6.0",
"bit-mask": "^1.0.2",
Expand Down
3 changes: 3 additions & 0 deletions src/context.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createContext } from 'react';

export const UserContext = createContext(null);
2 changes: 1 addition & 1 deletion src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ReactDOM.render(
<Routes>
<Route exact path='/admin/*' element={<Admin />} />
<Route exact path='/login' element={<Login />} />
<Route exact path='/' element={<Navigate from='/' to='/login' />} />
<Route exact path='/' element={<Navigate from='/' to='/admin/repo' />} />
</Routes>
</Router>,
document.getElementById('root'),
Expand Down
40 changes: 16 additions & 24 deletions src/routes.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-disable max-len */
/* eslint-disable require-jsdoc */

/* !
=========================================================
Expand All @@ -18,29 +15,32 @@
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
import Dashboard from '@material-ui/icons/Dashboard';

import Person from '@material-ui/icons/Person';
import DashboardPage from './ui/views/Dashboard/Dashboard';
import OpenPushRequests from './ui/views/OpenPushRequests/OpenPushRequests';
import PushDetails from './ui/views/PushDetails/PushDetails';
import User from './ui/views/User/User';
import UserList from './ui/views/UserList/UserList';
import RepoDetails from './ui/views/RepoDetails/RepoDetails';
import RepoList from './ui/views/RepoList/RepoList';

import { RepoIcon } from '@primer/octicons-react';

import { Group, AccountCircle, Dashboard } from '@material-ui/icons';

const dashboardRoutes = [
{
path: '/dashboard',
name: 'Dashboard',
icon: Dashboard,
component: DashboardPage,
path: '/repo',
name: 'Repositories',
icon: RepoIcon,
component: RepoList,
layout: '/admin',
visible: true,
},
{
path: '/push',
name: 'Open Push Requests',
icon: Person,
name: 'Dashboard',
icon: Dashboard,
component: OpenPushRequests,
layout: '/admin',
visible: true,
Expand All @@ -55,15 +55,15 @@ const dashboardRoutes = [
},
{
path: '/profile',
name: 'My Profile',
icon: Person,
name: 'My Account',
icon: AccountCircle,
component: User,
layout: '/admin',
visible: true,
},
{
path: '/user/:id',
name: 'User Details',
name: 'User',
icon: Person,
component: User,
layout: '/admin',
Expand All @@ -77,18 +77,10 @@ const dashboardRoutes = [
layout: '/admin',
visible: false,
},
{
path: '/repo',
name: 'Repositories',
icon: Person,
component: RepoList,
layout: '/admin',
visible: true,
},
{
path: '/user',
name: 'User List',
icon: Person,
name: 'Users',
icon: Group,
component: UserList,
layout: '/admin',
visible: true,
Expand Down

0 comments on commit 37d37ef

Please sign in to comment.