Skip to content

Commit

Permalink
add rfid page
Browse files Browse the repository at this point in the history
  • Loading branch information
BehshadBabai committed Dec 5, 2023
1 parent 916c920 commit c83174e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import { useAppDispatch, useAppSelector } from './Redux/hooks';
import { changeReports } from './Redux/features/report/report-slice';
import Loading from './Components/Loading';
import RfidData from './Pages/RfidData';

const { Content } = Layout;

Expand Down Expand Up @@ -99,6 +100,7 @@ const App = () => {
<Route path='/' element={<Home />} />
<Route index element={<Home />} />
<Route path='reports' element={<Reports />} />
<Route path='rfid' element={<RfidData />} />
<Route path='reports/create' element={<CreateReport />} />
<Route path='reports/:id' element={<Report />} />
<Route path='404' element={<NoPage />} />
Expand Down
13 changes: 3 additions & 10 deletions src/Components/HomeParts/LoggedIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,12 @@ const LoggedIn: React.FC = () => {
Reports
</Button>,
<Button
key='logout'
key='rfid'
onClick={async () => {
try {
await signOut(auth).then(() => {
message.success('Log Out Successful');
dispatch(changeLoggedIn(false));
});
} catch (error) {
api.error('Log Out Failed');
}
navigate('/rfid');
}}
>
Logout
RFID Data
</Button>
]}
/>
Expand Down
7 changes: 7 additions & 0 deletions src/Pages/RfidData.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

const RfidData: React.FC = () => {
return <></>;
};

export default RfidData;
2 changes: 2 additions & 0 deletions src/Utilities/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export const getCrumbItemsFromPath = (
const init = [homeItem];
if (path === '/') {
return init;
} else if (path === '/rfid' || path === '/rfid/') {
return [...init, { title: 'RFID Data', href: '/rfid' }];
} else if (path === '/reports' || path === '/reports/') {
return [...init, { title: 'Reports', href: '/reports' }];
} else if (path === '/reports/create' || path === '/reports/create/') {
Expand Down

0 comments on commit c83174e

Please sign in to comment.