Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter buttons admin dashboard #39

Merged
merged 4 commits into from
Feb 21, 2024
Merged

Conversation

kaitlinnleung
Copy link
Contributor

closes #31

}
};
getData();
}, [currentTab, currentPageNum]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <react-hooks/exhaustive-deps> reported by reviewdog 🐶
React Hook useEffect has missing dependencies: 'businessDictionary' and 'loadInfo'. Either include them or remove the dependency array.

Copy link
Contributor

@Xire7 Xire7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good stuff jits, just a lot of cleaning up uncommented code 👍

src/App.jsx Outdated
Comment on lines 17 to 23
<Navbar
{/* <Navbar
showContactUs={true}
title={''}
showSettings={false}
excelDownload={false}
backButton={true}
/>
/> */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this was commented out to test code, remember to uncomment it out when merging for development.

const changeTab = async (tab) => {
setCurrentTab(tab);
setCurrentPageNum(1);
//loadInfo(tab);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out unused code

Comment on lines 38 to 39
// const businessResponse = await backend.get(`/business/?businessLimit=10&pageNum=${currentPageNum}&tab=${tab}`);
// setBusinessDictionary(businessResponse.data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete unused code 👍

Comment on lines 119 to 120
//const response = await backend.get('/business');
//setData(response.data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete commented code

@@ -3,8 +3,10 @@ import './AdminDashboard.module.css';
import { useBackend } from '../../contexts/BackendContext';
import { useEffect, useState } from 'react';
import { Box } from '@chakra-ui/react';
//import { ChevronRightIcon, ChevronLeftIcon } from '@chakra-ui/icons';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete comment

const [businessDictionary, setBusinessDictionary] = useState([]);
const [currentBusinessNum, setCurrentBusinessNum] = useState(0);
const [currentPageNum, setCurrentPageNum] = useState(1);
const [currentTab, setCurrentTab] = useState('Active'); //change to all once all page is implemented
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good comment, just need to backtrack to changing the state to all when that page is implemented

@elenaytkao-8 elenaytkao-8 self-assigned this Feb 19, 2024
@Madhu2244 Madhu2244 merged commit d360fb3 into main Feb 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination + Filter buttons for Admin dashboard
5 participants