Skip to content

Commit d690a29

Browse files
committed
Cleanup
1 parent 8439639 commit d690a29

20 files changed

Lines changed: 66 additions & 3068 deletions

sidebar-demo/package-lock.json

Lines changed: 0 additions & 2926 deletions
This file was deleted.

src/App.tsx

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@ import { BrowserRouter, Route, Routes } from 'react-router-dom';
22
import { ThemeProvider } from './contexts/ThemeContext';
33
import AppLayout from './components/AppLayout.tsx';
44
import Home from './pages/Home.tsx';
5-
import Dashboard from './pages/Dashboard.tsx';
6-
import CreateEvent from './pages/events/CreateEvent.tsx';
7-
import EventHistory from './pages/events/EventHistory.tsx';
8-
import Calendar from './pages/Calendar.tsx';
9-
import Roster from './pages/Roster.tsx';
10-
import Notifications from './pages/Notifications.tsx';
5+
import Events from './pages/Events.tsx';
6+
import Insights from './pages/Insights.tsx';
7+
import Organizations from './pages/Organizations.tsx';
8+
import Testing from './pages/Testing.tsx'; // temp page
119
import Profile from './pages/Profile.tsx';
12-
import Settings from './pages/Settings.tsx';
13-
import { AuthProvider } from './context/AuthContext.tsx';
14-
import HelpCenter from './pages/HelpCenter.tsx';
10+
import { AuthProvider } from './contexts/AuthContext.tsx';
1511

1612
function App() {
1713
return (
@@ -20,17 +16,13 @@ function App() {
2016
<ThemeProvider>
2117
<BrowserRouter>
2218
<Routes>
23-
<Route path="/" element={<Home />} />
2419
<Route element={<AppLayout />}>
25-
<Route path="/dashboard" element={<Dashboard />} />
26-
<Route path="/events/create" element={<CreateEvent />} />
27-
<Route path="/events/history" element={<EventHistory />} />
28-
<Route path="/calendar" element={<Calendar />} />
29-
<Route path="/roster" element={<Roster />} />
30-
<Route path="/notifications" element={<Notifications />} />
20+
<Route path="/" element={<Home />} />
21+
<Route path="/events" element={<Events />} />
22+
<Route path="/insights" element={<Insights />} />
23+
<Route path="/organizations" element={<Organizations />} />
24+
<Route path="/testing" element={<Testing />} />
3125
<Route path="/profile" element={<Profile />} />
32-
<Route path="/settings" element={<Settings />} />
33-
<Route path="/help" element={<HelpCenter />} />
3426
</Route>
3527
</Routes>
3628
</BrowserRouter>

src/components/LoginPopup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect } from 'react';
2-
import { useAuth } from '../context/AuthContext';
2+
import { useAuth } from '../contexts/AuthContext';
33
import '../css/login.css';
44

55
type Props = {

src/components/sidebar/Sidebar.tsx

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
import '../../css/sidebar.css';
22
import '../../css/login.css';
3-
import SidebarGroup from './SidebarGroup.tsx';
43
import SidebarLink from './SidebarLink.tsx';
5-
//import { type useNavigate } from 'react-router-dom';
6-
import { useState } from 'react';
7-
import LoginPopup from '../LoginPopup.tsx';
84
import SidebarProfile from './SidebarProfile.tsx';
95
import SidebarWorkspace from './SidebarWorkspace.tsx';
106

117
import {
128
Bars3Icon,
139
HomeIcon,
1410
StarIcon,
15-
PlusIcon,
16-
ClipboardDocumentCheckIcon,
1711
CalendarDaysIcon,
1812
UserGroupIcon,
19-
BellAlertIcon,
2013
UserCircleIcon,
21-
Cog8ToothIcon,
22-
QuestionMarkCircleIcon,
2314
} from '@heroicons/react/24/solid';
2415

2516
type SidebarProps = {
@@ -28,8 +19,6 @@ type SidebarProps = {
2819
};
2920

3021
export default function Sidebar({ collapsed, onToggle }: SidebarProps) {
31-
const [showLogin, setShowLogin] = useState(false);
32-
3322
return (
3423
<>
3524
<div className={`sidebar ${collapsed ? 'collapsed' : ''}`}>
@@ -40,50 +29,17 @@ export default function Sidebar({ collapsed, onToggle }: SidebarProps) {
4029
</button>
4130
</div>
4231
<div className="main-sidebar-link-container">
43-
<SidebarLink label="Dashboard" icon={<HomeIcon />} nav="/dashboard" />
32+
<SidebarLink label="Home" icon={<HomeIcon />} nav="/" />
4433
<SidebarLink label="Events" icon={<StarIcon />} nav="/events" />
45-
<SidebarLink label="Calendar" icon={<CalendarDaysIcon />} nav="/calendar" />
46-
<SidebarLink label="Roster" icon={<UserGroupIcon />} nav="/roster" />
34+
<SidebarLink label="Insights" icon={<CalendarDaysIcon />} nav="/insights" />
4735
<SidebarLink
48-
label="Notifications"
49-
icon={<BellAlertIcon />}
50-
nav="/notifications"
36+
label="Organizations"
37+
icon={<UserGroupIcon />}
38+
nav="/organizations"
5139
/>
40+
<SidebarLink label="[dev] Testing" icon={<UserGroupIcon />} nav="/testing" />
5241
</div>
53-
<div className="lower-sidebar-link-container">
54-
<SidebarLink label="My Profile" icon={<UserCircleIcon />} nav="/profile" />
55-
<SidebarLink label="Settings" icon={<Cog8ToothIcon />} nav="/settings" />
56-
</div>
57-
<a className="register-btn" onClick={() => setShowLogin(true)}>
58-
{' '}
59-
Register{' '}
60-
</a>
61-
<LoginPopup isOpen={showLogin} onClose={() => setShowLogin(false)} />
62-
<SidebarWorkspace workspace="Overview">
63-
<SidebarLink label="Dashboard" icon={<HomeIcon />} nav="/dashboard" />
64-
<SidebarGroup label="Events" icon={<StarIcon />} collapsed={collapsed}>
65-
<SidebarLink label="Create" icon={<PlusIcon />} nav="/events/create" />
66-
<SidebarLink
67-
label="History"
68-
icon={<ClipboardDocumentCheckIcon />}
69-
nav="/events/history"
70-
/>
71-
</SidebarGroup>
72-
<SidebarLink label="Calendar" icon={<CalendarDaysIcon />} nav="/calendar" />
73-
<SidebarLink label="Roster" icon={<UserGroupIcon />} nav="/roster" />
74-
<SidebarLink
75-
label="Notifications"
76-
icon={<BellAlertIcon />}
77-
nav="/notifications"
78-
/>
79-
</SidebarWorkspace>
8042
<SidebarWorkspace>
81-
<SidebarLink
82-
label="Help Center"
83-
icon={<QuestionMarkCircleIcon />}
84-
nav="/help"
85-
/>
86-
<SidebarLink label="Settings" icon={<Cog8ToothIcon />} nav="/settings" />
8743
<SidebarProfile
8844
icon={<UserCircleIcon />}
8945
name="Kevin Smith"

src/components/sidebar/SidebarGroup.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*
2+
3+
*** NOT IN USE ***
4+
Groups links allowing for a nested structure
5+
on the Sidebar.
6+
7+
*/
8+
19
import { ChevronRightIcon, ChevronDownIcon } from '@heroicons/react/24/solid';
210
import { useState, useEffect } from 'react';
311

src/components/sidebar/SidebarWorkspace.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
3+
Currently only used as a standard div, but supports
4+
a toggle for viewing links.
5+
6+
*/
7+
18
import React from 'react';
29
import { useState } from 'react';
310

src/css/sidebar.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,3 @@
203203
max-width: 0;
204204
opacity: 0;
205205
}
206-
207-
.register-btn {
208-
color: black;
209-
}

src/pages/Dashboard.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
export default function Roster() {
1+
export default function Events() {
22
return (
33
<>
44
<div>
5-
<h1>Roster</h1>
5+
<h1>My Events</h1>
66
</div>
77
</>
88
);

0 commit comments

Comments
 (0)