Skip to content

Commit

Permalink
✨ chore: comment out unused navigate hook
Browse files Browse the repository at this point in the history
Remove unnecessary navigate hook usage. Enhances code
readability and avoids potential confusion in `ListCategories`.
  • Loading branch information
Sorok-Dva committed Aug 15, 2024
1 parent abf315c commit bde6dde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/admin/ListCategories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useAuth } from 'context/AuthContext'
import PageBanner from 'components/Common/PageBanner'
import { toast } from 'react-toastify'
import { ToastOptionsDefault } from 'utils/toastOptions'
import { useNavigate } from 'react-router-dom'
// import { useNavigate } from 'react-router-dom'

const ListContainer = styled.div`
padding: 2rem;
Expand Down Expand Up @@ -72,7 +72,7 @@ const EditButton = styled(Button)`
const CategoryList: React.FC = () => {
const { token } = useAuth()
const [categories, setCategories] = useState<{ id: number; title: string; description: string }[]>([])
const navigate = useNavigate()
// const navigate = useNavigate()

useEffect(() => {
const fetchCategories = async () => {
Expand Down

0 comments on commit bde6dde

Please sign in to comment.