Skip to content

Commit

Permalink
fix wishlist file name
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcs0128 committed Mar 7, 2024
1 parent 8ed5d31 commit f62f668
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"vendor": "vtex",
"version": "1.16.6",
"title": "Wish List",
"description": "The Wishlist app is designed for B2C. It adds a heart icon to the Shelfs and Product Page, so the user can add it to the Wishlist, you can list all the Wishlisted items at /wishlist",
"description": "The Wishlist a pp is designed for B2C. It adds a heart icon to the Shelfs and Product Page, so the user can add it to the Wishlist, you can list all the Wishlisted items at /wishlist",
"categories": [],
"settingsSchema": {},
"builders": {
Expand Down
11 changes: 9 additions & 2 deletions react/WishlistAdmin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,18 @@ const WishlistAdmin: FC<any> = ({ intl }) => {
}
}


const ws = XLSX.utils.json_to_sheet(data, { header })
const wb = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1')
const exportFileName = `wishlists_page_${selected1}.xls`
XLSX.writeFile(wb, exportFileName)
if(selected1 != null) {
const exportFileName = `wishlists_page_${selected1}.xls`
XLSX.writeFile(wb, exportFileName)
} else {
const exportFileName = `wishlists.xls`
XLSX.writeFile(wb, exportFileName)

}
}

const { data, loading: queryLoading } = useQuery(exportList, {
Expand Down

0 comments on commit f62f668

Please sign in to comment.