From 08fb401c575d4c62175bc11dcaf9e00bb35cd595 Mon Sep 17 00:00:00 2001
From: Stuart Long Chay Boon <chayboon@gmail.com>
Date: Wed, 12 Oct 2022 23:06:37 +0800
Subject: [PATCH] [offers][fix] change id to profileid

---
 apps/portal/src/pages/offers/profile/[offerProfileId].tsx | 2 +-
 apps/portal/src/pages/offers/test/listOffers.tsx          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/portal/src/pages/offers/profile/[offerProfileId].tsx b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx
index 85a644af..31857c64 100644
--- a/apps/portal/src/pages/offers/profile/[offerProfileId].tsx
+++ b/apps/portal/src/pages/offers/profile/[offerProfileId].tsx
@@ -136,7 +136,7 @@ export default function OfferProfile() {
   function handleDelete() {
     if (isEditable) {
       deleteMutation.mutate({
-        id: offerProfileId as string,
+        profileId: offerProfileId as string,
         token: 'CHANGE THIS PART TO URL PARAM @ ZIQING', // TODO: token: token as string,
       });
       trpcContext.invalidateQueries(['offers.profile.listOne']);
diff --git a/apps/portal/src/pages/offers/test/listOffers.tsx b/apps/portal/src/pages/offers/test/listOffers.tsx
index 982dba68..282abf0c 100644
--- a/apps/portal/src/pages/offers/test/listOffers.tsx
+++ b/apps/portal/src/pages/offers/test/listOffers.tsx
@@ -17,7 +17,7 @@ function Test() {
   const deleteMutation = trpc.useMutation(['offers.profile.delete']);
 
   const handleDelete = (id: string) => {
-    deleteMutation.mutate({ id, token: ' dadaadad' });
+    deleteMutation.mutate({ profileId: id, token: ' dadaadad' });
   };
 
   return (