fix(admin-ui): Remove t() on product.status update (#5394)

* fix(admin-ui): Remove t() on product.status update

* Create tidy-games-drum.md
This commit is contained in:
Oli Juhl
2023-10-18 13:50:47 +02:00
committed by GitHub
parent 98e2755514
commit a0963f0edf
4 changed files with 21 additions and 18 deletions
@@ -48,10 +48,7 @@ const useProductActions = (product: Product) => {
? t("product-table-unpublish", "Unpublish")
: t("product-table-publish", "Publish"),
onClick: () => {
const newStatus =
product.status === "published"
? t("product-table-draft", "draft")
: t("product-table-published", "published")
const newStatus = product.status === "published" ? "draft" : "published"
updateProduct.mutate(
{
status: newStatus,
@@ -132,7 +132,6 @@ const useEditProductActions = (productId: string) => {
const newStatus = currentStatus === "published" ? "draft" : "published"
updateProduct.mutate(
{
// @ts-ignore TODO fix update type in API
status: newStatus,
},
{