-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
…iltration and pagination to AdminDashboard
} | ||
}; | ||
getData(); | ||
}, [currentTab, currentPageNum]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React Hook useEffect has missing dependencies: 'businessDictionary' and 'loadInfo'. Either include them or remove the dependency array.
There was a problem hiding this 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
<Navbar | ||
{/* <Navbar | ||
showContactUs={true} | ||
title={''} | ||
showSettings={false} | ||
excelDownload={false} | ||
backButton={true} | ||
/> | ||
/> */} |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
// const businessResponse = await backend.get(`/business/?businessLimit=10&pageNum=${currentPageNum}&tab=${tab}`); | ||
// setBusinessDictionary(businessResponse.data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete unused code 👍
//const response = await backend.get('/business'); | ||
//setData(response.data); |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
closes #31