From 994d6b5ab759f982e11bcc7c08ce16751ab85113 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Thu, 11 Apr 2024 11:47:54 +0530 Subject: [PATCH 01/12] Update hierarchy of SnackBar Provider and ThemeRegistry --- src/ui/app/layout.tsx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/ui/app/layout.tsx b/src/ui/app/layout.tsx index 526797e1..add32e1c 100644 --- a/src/ui/app/layout.tsx +++ b/src/ui/app/layout.tsx @@ -38,26 +38,26 @@ export default function RootLayout({ Xfluencer Beta - - - - + + + + {children} - - - - + + + + ); From 8d91cbb905d3f2c63959ce5f32ed2e623be384e8 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Thu, 11 Apr 2024 11:48:06 +0530 Subject: [PATCH 02/12] Add orderCancellationSlice --- src/ui/src/reducers/orderCancellationSlice.ts | 25 +++++++++++++++++++ src/ui/src/store.ts | 16 +++++++++--- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 src/ui/src/reducers/orderCancellationSlice.ts diff --git a/src/ui/src/reducers/orderCancellationSlice.ts b/src/ui/src/reducers/orderCancellationSlice.ts new file mode 100644 index 00000000..1f0c4d03 --- /dev/null +++ b/src/ui/src/reducers/orderCancellationSlice.ts @@ -0,0 +1,25 @@ +import { createSlice } from "@reduxjs/toolkit"; + +type OrderCancellationState = { + cancellationInProgress: boolean; +}; + +const initialState: OrderCancellationState = { + cancellationInProgress: false, +}; + +export const orderCancellationSlice = createSlice({ + name: "orderCancellation", + initialState, + reducers: { + startCancellation: (state) => { + state.cancellationInProgress = true; + }, + endCancellation: (state) => { + state.cancellationInProgress = false; + }, + }, +}); + +export const { startCancellation, endCancellation } = + orderCancellationSlice.actions; diff --git a/src/ui/src/store.ts b/src/ui/src/store.ts index 93e62187..982749b3 100644 --- a/src/ui/src/store.ts +++ b/src/ui/src/store.ts @@ -1,6 +1,7 @@ import { configureStore } from "@reduxjs/toolkit"; import { userSlice } from "./reducers/userSlice"; import { cartSlice } from "./reducers/cartSlice"; +import { orderCancellationSlice } from "./reducers/orderCancellationSlice"; import { FLUSH, PAUSE, @@ -15,15 +16,16 @@ import storage from "./storage"; const userPersistConfig = { key: "user", storage: storage, - whitelist: ["user"], - blacklist: ["navigation"], }; const cartPersistConfig = { key: "cart", storage: storage, - whitelist: ["cart"], - blacklist: ["navigation"], +}; + +const orderCancellationPersistConfig = { + key: "orderCancellation", + storage: storage, }; const persistedUserReducer = persistReducer( @@ -35,12 +37,18 @@ const persistedCartReducer = persistReducer( cartSlice.reducer ); +const persistedOrderCancellationReducer = persistReducer( + orderCancellationPersistConfig, + orderCancellationSlice.reducer +); + export const makeStore = () => { return configureStore({ reducer: { // Add the generated reducer as a specific top-level slice user: persistedUserReducer, cart: persistedCartReducer, + orderCancellation: persistedOrderCancellationReducer, }, middleware: (getDefaultMiddleware) => getDefaultMiddleware({ From a8ffbea15b9620323e998637d6765013bd1b2584 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Thu, 11 Apr 2024 11:48:49 +0530 Subject: [PATCH 03/12] Add disabled prop to confirmCancel and cancelEscrow --- src/ui/src/components/shared/confirmCancel/index.tsx | 8 +++++++- .../src/components/web3Components/cancelEscrow/index.tsx | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ui/src/components/shared/confirmCancel/index.tsx b/src/ui/src/components/shared/confirmCancel/index.tsx index 7fb59ef3..77e954e6 100644 --- a/src/ui/src/components/shared/confirmCancel/index.tsx +++ b/src/ui/src/components/shared/confirmCancel/index.tsx @@ -21,6 +21,7 @@ interface Props { hide?: boolean; deleteElement: React.ReactNode; sx?: any; + disabled?: boolean; } const Transition = React.forwardRef(function Transition( @@ -39,6 +40,7 @@ export const ConfirmCancel: React.FC = ({ hide = false, deleteElement, sx, + disabled, }) => { const [open, setOpen] = React.useState(false); return ( @@ -49,7 +51,11 @@ export const ConfirmCancel: React.FC = ({ > setOpen(true)} + onClick={() => { + if (!disabled) { + setOpen(true); + } + }} sx={{ width: "100%", cursor: "pointer" }} > {deleteElement} diff --git a/src/ui/src/components/web3Components/cancelEscrow/index.tsx b/src/ui/src/components/web3Components/cancelEscrow/index.tsx index 78dab690..910b30dd 100644 --- a/src/ui/src/components/web3Components/cancelEscrow/index.tsx +++ b/src/ui/src/components/web3Components/cancelEscrow/index.tsx @@ -25,6 +25,7 @@ type CancelEscrowProps = { order: OrderType; updateStatus: () => void; setConnectWallet: (value: boolean) => void; + disabled: boolean; }; const programId = new PublicKey(idl.metadata.address); @@ -33,6 +34,7 @@ export default function CancelEscrow({ updateStatus, order, setConnectWallet, + disabled, }: CancelEscrowProps) { const [localLoading, setLocalLoading] = useState(false); const connection = new Connection(`${process.env.NEXT_PUBLIC_RPC_LINK}`, { @@ -230,7 +232,7 @@ export default function CancelEscrow({ onClick={() => { cancelEscrow(); }} - disabled={localLoading} + disabled={localLoading || disabled} > From 09cd7a16683cdb35428fab21b92917d2d9418ab0 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Thu, 11 Apr 2024 11:48:57 +0530 Subject: [PATCH 04/12] Add order cancellation functionality to BusinessDashboardPage and Orders page --- src/ui/app/business/dashboard/page.tsx | 15 +++++++++++++ src/ui/app/influencer/orders/page.tsx | 31 +++++++++++++++++++------- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/ui/app/business/dashboard/page.tsx b/src/ui/app/business/dashboard/page.tsx index fc0defc7..51e7ee61 100644 --- a/src/ui/app/business/dashboard/page.tsx +++ b/src/ui/app/business/dashboard/page.tsx @@ -66,6 +66,11 @@ import CancelIcon from "@mui/icons-material/Cancel"; import RuleOutlinedIcon from "@mui/icons-material/RuleOutlined"; import ManualVerifyModal from "@/src/components/dashboardComponents/manualVerifyModal"; import WalletConnectModal from "@/src/components/web3Components/walletConnectModal"; +import { useAppDispatch, useAppSelector } from "@/src/hooks/useRedux"; +import { + endCancellation, + startCancellation, +} from "@/src/reducers/orderCancellationSlice"; const tabs = [ { @@ -83,6 +88,10 @@ const tabs = [ ]; export default function BusinessDashboardPage() { const router = useRouter(); + const dispatch = useAppDispatch(); + const cancellationInProgress = useAppSelector( + (state) => state.orderCancellation.cancellationInProgress + ); const [connectWallet, setConnectWallet] = useState(false); const searchParams = useSearchParams(); const [selectedOrder, setSelectedOrder] = useState(null); @@ -360,6 +369,7 @@ export default function BusinessDashboardPage() { ); + dispatch(startCancellation()); const cancellationNotification = enqueueSnackbar( `Cancelling ${order?.order_code}, please wait for confirmation`, { @@ -374,10 +384,12 @@ export default function BusinessDashboardPage() { ); if (isSuccess) { closeSnackbar(cancellationNotification); + dispatch(endCancellation()); notification("Order cancelled successfully", "success"); getOrders(); } else { closeSnackbar(cancellationNotification); + dispatch(endCancellation()); notification( message ? message : "Something went wrong, couldn't cancel order", "error", @@ -833,6 +845,7 @@ export default function BusinessDashboardPage() { setSelectedOrder(params?.row); setOpen(true); }} + disabled={cancellationInProgress} > @@ -864,6 +877,7 @@ export default function BusinessDashboardPage() { order={params?.row} updateStatus={getOrders} setConnectWallet={setConnectWallet} + disabled={cancellationInProgress} /> )} {(params?.row?.status === ORDER_STATUS.ACCEPTED || @@ -882,6 +896,7 @@ export default function BusinessDashboardPage() { } title={`Order ${params?.row?.order_code}`} hide={true} + disabled={cancellationInProgress} /> )} diff --git a/src/ui/app/influencer/orders/page.tsx b/src/ui/app/influencer/orders/page.tsx index 1030be3a..33259f6b 100644 --- a/src/ui/app/influencer/orders/page.tsx +++ b/src/ui/app/influencer/orders/page.tsx @@ -1,13 +1,16 @@ "use client"; +import BackIcon from "@/public/svg/Back.svg"; import Star from "@/public/svg/Star.svg"; import { notification } from "@/src/components/shared/notification"; import { postService, putService } from "@/src/services/httpServices"; -import { KeyboardBackspace, OpenInFull } from "@mui/icons-material"; -import BackIcon from "@/public/svg/Back.svg"; +import { OpenInFull } from "@mui/icons-material"; import Image from "next/image"; +import XfluencerLogo from "@/public/svg/Xfluencer_Logo_Beta.svg"; import OrderSummaryDetails from "@/src/components/dashboardComponents/orderSummaryDetails"; import OrderSummaryTable from "@/src/components/dashboardComponents/orderSummaryTable"; +import RouteProtection from "@/src/components/shared/routeProtection"; +import { DriveEta } from "@mui/icons-material"; import { Box, Button, @@ -29,21 +32,27 @@ import { GridTreeNodeWithRender, } from "@mui/x-data-grid"; import NextLink from "next/link"; -import React, { useEffect, useState } from "react"; -import RouteProtection from "@/src/components/shared/routeProtection"; import { useRouter } from "next/navigation"; -import Joyride, { ACTIONS, EVENTS, STATUS } from "react-joyride"; -import XfluencerLogo from "@/public/svg/Xfluencer_Logo_Beta.svg"; -import { DriveEta } from "@mui/icons-material"; import { closeSnackbar, enqueueSnackbar } from "notistack"; +import React, { useEffect, useState } from "react"; +import Joyride, { ACTIONS, EVENTS, STATUS } from "react-joyride"; +import { useAppDispatch, useAppSelector } from "@/src/hooks/useRedux"; +import { + endCancellation, + startCancellation, +} from "@/src/reducers/orderCancellationSlice"; export default function Orders() { const router = useRouter(); - const [open, setOpen] = React.useState(false); + const cancellationInProgress = useAppSelector( + (state) => state.orderCancellation.cancellationInProgress + ); + const dispatch = useAppDispatch(); const [selectedAction, setSelectedAction] = useState({ status: "", orderId: "", }); + const [open, setOpen] = React.useState(false); const [loading, setLoading] = useState(false); const [actionLoading, setActionLoading] = useState(false); const [orders, setOrders] = useState([]); @@ -356,6 +365,7 @@ export default function Orders() { setSelectedAction({ status: "Accept", orderId }); handleClickOpen(); }} + disabled={cancellationInProgress} > Accept @@ -369,6 +379,7 @@ export default function Orders() { setSelectedAction({ status: "Decline", orderId }); handleClickOpen(); }} + disabled={cancellationInProgress} > Decline @@ -396,6 +407,7 @@ export default function Orders() { pagination.current_page_number, pagination.current_page_size, actionLoading, + cancellationInProgress, ]); const handleAction = async () => { @@ -410,6 +422,7 @@ export default function Orders() { ); + dispatch(startCancellation()); const cancellationNotification = enqueueSnackbar( `Declining order request, please wait for confirmation`, { @@ -424,6 +437,7 @@ export default function Orders() { ); if (isSuccess) { closeSnackbar(cancellationNotification); + dispatch(endCancellation()); getOrders(); notification( "Order request was declined successfully", @@ -432,6 +446,7 @@ export default function Orders() { ); } else { closeSnackbar(cancellationNotification); + dispatch(endCancellation()); notification( message ? message : "Something went wrong, couldn't cancel order", "error" From ecfb6a75001a06bc49230fd7c9b829c1ae329b99 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Thu, 11 Apr 2024 11:51:30 +0530 Subject: [PATCH 05/12] Refactor BusinessDashboardPage to use disabled prop for order cancellation button --- src/ui/app/business/dashboard/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/app/business/dashboard/page.tsx b/src/ui/app/business/dashboard/page.tsx index 51e7ee61..4daae327 100644 --- a/src/ui/app/business/dashboard/page.tsx +++ b/src/ui/app/business/dashboard/page.tsx @@ -892,7 +892,9 @@ export default function BusinessDashboardPage() { cancelOrder(params?.row); }} deleteElement={ - + + + } title={`Order ${params?.row?.order_code}`} hide={true} From 1f9fe72726db232332a1cd53b85fe92e2de5eec7 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Thu, 11 Apr 2024 14:21:06 +0530 Subject: [PATCH 06/12] Update timeout for confirmTransactionInitialTimeout in cancelEscrow and createEscrow components --- src/ui/src/components/web3Components/cancelEscrow/index.tsx | 4 ++-- src/ui/src/components/web3Components/claimEscrow/index.tsx | 2 +- src/ui/src/components/web3Components/createEscrow/index.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/src/components/web3Components/cancelEscrow/index.tsx b/src/ui/src/components/web3Components/cancelEscrow/index.tsx index 910b30dd..da69549d 100644 --- a/src/ui/src/components/web3Components/cancelEscrow/index.tsx +++ b/src/ui/src/components/web3Components/cancelEscrow/index.tsx @@ -39,7 +39,7 @@ export default function CancelEscrow({ const [localLoading, setLocalLoading] = useState(false); const connection = new Connection(`${process.env.NEXT_PUBLIC_RPC_LINK}`, { commitment: "confirmed", - confirmTransactionInitialTimeout: 30000, + confirmTransactionInitialTimeout: 60000, }); const wallet = useAnchorWallet(); @@ -126,7 +126,7 @@ export default function CancelEscrow({ const tx = new Transaction().add(ix); const options = { - skipPreflight: true, + skipPreflight: process.env.NEXT_PUBLIC_RPC_LINK?.includes("devnet"), }; try { diff --git a/src/ui/src/components/web3Components/claimEscrow/index.tsx b/src/ui/src/components/web3Components/claimEscrow/index.tsx index 55d83b62..fc03ac61 100644 --- a/src/ui/src/components/web3Components/claimEscrow/index.tsx +++ b/src/ui/src/components/web3Components/claimEscrow/index.tsx @@ -123,7 +123,7 @@ export default function ClaimEscrow({ const tx = new Transaction().add(ix); const options = { - skipPreflight: true, + skipPreflight: process.env.NEXT_PUBLIC_RPC_LINK?.includes("devnet"), }; try { diff --git a/src/ui/src/components/web3Components/createEscrow/index.tsx b/src/ui/src/components/web3Components/createEscrow/index.tsx index 94f4723d..e450c51a 100644 --- a/src/ui/src/components/web3Components/createEscrow/index.tsx +++ b/src/ui/src/components/web3Components/createEscrow/index.tsx @@ -42,7 +42,7 @@ export default function CreateEscrow({ const [localLoading, setLocalLoading] = useState(false); const connection = new Connection(`${process.env.NEXT_PUBLIC_RPC_LINK}`, { commitment: "confirmed", - confirmTransactionInitialTimeout: 30000, + confirmTransactionInitialTimeout: 60000, }); const wallet = useAnchorWallet(); @@ -105,7 +105,7 @@ export default function CreateEscrow({ const tx = new Transaction().add(ix); const options = { - skipPreflight: true, // WARNING: This is dangerous on Mainnet + skipPreflight: process.env.NEXT_PUBLIC_RPC_LINK?.includes("devnet"), }; try { From edd7ff340f39a2d5c901e8ebe1141e451f097b2b Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Thu, 11 Apr 2024 14:23:38 +0530 Subject: [PATCH 07/12] Update confirmTransactionInitialTimeout in cancelEscrow and createEscrow components --- src/ui/src/components/web3Components/cancelEscrow/index.tsx | 2 +- src/ui/src/components/web3Components/createEscrow/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/src/components/web3Components/cancelEscrow/index.tsx b/src/ui/src/components/web3Components/cancelEscrow/index.tsx index da69549d..bdb23063 100644 --- a/src/ui/src/components/web3Components/cancelEscrow/index.tsx +++ b/src/ui/src/components/web3Components/cancelEscrow/index.tsx @@ -39,7 +39,7 @@ export default function CancelEscrow({ const [localLoading, setLocalLoading] = useState(false); const connection = new Connection(`${process.env.NEXT_PUBLIC_RPC_LINK}`, { commitment: "confirmed", - confirmTransactionInitialTimeout: 60000, + confirmTransactionInitialTimeout: 30000, }); const wallet = useAnchorWallet(); diff --git a/src/ui/src/components/web3Components/createEscrow/index.tsx b/src/ui/src/components/web3Components/createEscrow/index.tsx index e450c51a..24bf2e0d 100644 --- a/src/ui/src/components/web3Components/createEscrow/index.tsx +++ b/src/ui/src/components/web3Components/createEscrow/index.tsx @@ -42,7 +42,7 @@ export default function CreateEscrow({ const [localLoading, setLocalLoading] = useState(false); const connection = new Connection(`${process.env.NEXT_PUBLIC_RPC_LINK}`, { commitment: "confirmed", - confirmTransactionInitialTimeout: 60000, + confirmTransactionInitialTimeout: 30000, }); const wallet = useAnchorWallet(); From ee364a7fa7e486c2360d7d7242ba2e2fe397bc43 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Thu, 11 Apr 2024 15:28:49 +0530 Subject: [PATCH 08/12] Add secondary sorting to upcoming orders --- src/api/marketplace/orders/views.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/api/marketplace/orders/views.py b/src/api/marketplace/orders/views.py index 53ca156b..6979fa6e 100644 --- a/src/api/marketplace/orders/views.py +++ b/src/api/marketplace/orders/views.py @@ -215,6 +215,12 @@ def post(self, request): When(min_publish_date__gte=Now(), then=True), default=False, output_field=BooleanField(), + ), + is_accepted_or_pending=Case( + When(Q(status='accepted') | Q( + status='pending'), then=True), + default=False, + output_field=BooleanField(), ) ).order_by( '-is_future', @@ -222,7 +228,8 @@ def post(self, request): When(is_future=True, then=F('time_difference')), When(is_future=False, then=F('time_difference') * -1), output_field=DateTimeField(), - ) + ), + '-is_accepted_or_pending', ) elif "order_by" in filters: orders = orders.order_by(filters["order_by"]) From 4a6b4744ff322cfd3c5d147959c21b94627eb119 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Fri, 12 Apr 2024 10:50:20 +0530 Subject: [PATCH 09/12] Remove tokens from logs --- src/api/marketplace/accounts/tasks.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/api/marketplace/accounts/tasks.py b/src/api/marketplace/accounts/tasks.py index 06af78f6..91271be7 100644 --- a/src/api/marketplace/accounts/tasks.py +++ b/src/api/marketplace/accounts/tasks.py @@ -54,11 +54,6 @@ def updateAccessTokens(): logger.error( f"Error refreshing token for {twitter_account.id}, {twitter_account.user_name}: {e}") continue - logger.info( - f"New Access token for {twitter_account.id}, {twitter_account.user_name}: {new_token['access_token']}") - logger.info( - f"New Refresh token for {twitter_account.id}, {twitter_account.user_name}: {new_token['refresh_token']}") - # Update the TwitterAccount model with the new tokens twitter_account.access_token = new_token["access_token"] twitter_account.refresh_token = new_token["refresh_token"] From 38ad31262fdfd3e9a4102868185890ceac42acb6 Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Fri, 12 Apr 2024 10:59:40 +0530 Subject: [PATCH 10/12] Update onlyUnread state to default to true in NotificationPanel component --- src/ui/src/components/notificationPanel/index.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ui/src/components/notificationPanel/index.tsx b/src/ui/src/components/notificationPanel/index.tsx index 9a02a9b2..362fad2c 100644 --- a/src/ui/src/components/notificationPanel/index.tsx +++ b/src/ui/src/components/notificationPanel/index.tsx @@ -37,7 +37,7 @@ export default function NotificationPanel({ const [notificationsAnchor, setNotificationsAnchor] = React.useState(null); const openNotifications = Boolean(notificationsAnchor); const [notifications, setNotifications] = useState([]); - const [onlyUnread, setOnlyUnread] = useState(null); + const [onlyUnread, setOnlyUnread] = useState(true); const [pagination, setPagination] = useState({ total_data_count: 0, total_page_count: 0, @@ -127,10 +127,6 @@ export default function NotificationPanel({ })); }; - useEffect(() => { - setOnlyUnread(null); - }, [openNotifications]); - useEffect(() => { const delayDebounceFn = setTimeout(() => { getNotifications(); @@ -194,7 +190,7 @@ export default function NotificationPanel({ borderRadius: "none", boxShadow: "0px 3px 7px #00000026", minHeight: 300, - maxHeight: 700, + maxHeight: "85vh", overflow: "auto", px: 2, py: 1, From 35e3fd660f30479b1362c73264e4caa4dfaba93e Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Fri, 12 Apr 2024 10:59:45 +0530 Subject: [PATCH 11/12] Update cursor style for disabled state in confirmCancel and cancelEscrow components --- src/ui/src/components/shared/confirmCancel/index.tsx | 2 +- src/ui/src/components/web3Components/cancelEscrow/index.tsx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/src/components/shared/confirmCancel/index.tsx b/src/ui/src/components/shared/confirmCancel/index.tsx index 77e954e6..61c40202 100644 --- a/src/ui/src/components/shared/confirmCancel/index.tsx +++ b/src/ui/src/components/shared/confirmCancel/index.tsx @@ -56,7 +56,7 @@ export const ConfirmCancel: React.FC = ({ setOpen(true); } }} - sx={{ width: "100%", cursor: "pointer" }} + sx={{ width: "100%", cursor: disabled ? "not-allowed" : "pointer" }} > {deleteElement} diff --git a/src/ui/src/components/web3Components/cancelEscrow/index.tsx b/src/ui/src/components/web3Components/cancelEscrow/index.tsx index bdb23063..3ed5e94d 100644 --- a/src/ui/src/components/web3Components/cancelEscrow/index.tsx +++ b/src/ui/src/components/web3Components/cancelEscrow/index.tsx @@ -233,6 +233,9 @@ export default function CancelEscrow({ cancelEscrow(); }} disabled={localLoading || disabled} + sx={{ + cursor: disabled ? "not-allowed" : "pointer", + }} > From 8ef69c8863f1d93af6f30b2cf2b7c2fc0eaada4d Mon Sep 17 00:00:00 2001 From: Mudit Mahajan Date: Fri, 12 Apr 2024 11:09:38 +0530 Subject: [PATCH 12/12] Remove setLoading state action from joyride handlers --- src/ui/app/business/dashboard/page.tsx | 2 -- src/ui/app/influencer/dashboard/page.tsx | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/ui/app/business/dashboard/page.tsx b/src/ui/app/business/dashboard/page.tsx index 4daae327..e855ec9e 100644 --- a/src/ui/app/business/dashboard/page.tsx +++ b/src/ui/app/business/dashboard/page.tsx @@ -264,7 +264,6 @@ export default function BusinessDashboardPage() { const handleUserInteraction = async () => { try { - setLoading(true); const { isSuccess, data, message } = await postService( `orders/order-list/`, { @@ -291,7 +290,6 @@ export default function BusinessDashboardPage() { } } } finally { - setLoading(false); } }; diff --git a/src/ui/app/influencer/dashboard/page.tsx b/src/ui/app/influencer/dashboard/page.tsx index f32ae6b8..3412dbda 100644 --- a/src/ui/app/influencer/dashboard/page.tsx +++ b/src/ui/app/influencer/dashboard/page.tsx @@ -280,7 +280,6 @@ export default function BusinessDashboardPage() { const handleUserInteraction = async () => { try { - setLoading(true); const { isSuccess, data, message } = await postService( `orders/order-list/`, { @@ -296,7 +295,6 @@ export default function BusinessDashboardPage() { } } } finally { - setLoading(false); } };