Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kir4che committed Jan 22, 2024
1 parent 60be7d0 commit 5129230
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions client/src/pages/admin/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ const Dashboard = () => {
if (productLoading || postLoading || orderLoading) return <Loading />
else if ((!productLoading && !products) || (!postLoading && !posts) || (!orderLoading && !orders)) return <Error message={[productError, postError, orderError]} />

const handleFormOpen = (item, data) => {
if (item === 'products') {
setProductForm(data)
setIsAddOrEditProductForm(data.title === '' ? 'add' : 'edit')
} else {
setPostForm(data)
setIsAddOrEditPostForm(data.title === '' ? 'add' : 'edit')
}
}

const handleFormUpdate = async (item: string, todo: string) => {
if (todo === 'add') {
try {
Expand Down

0 comments on commit 5129230

Please sign in to comment.