Skip to content

Commit

Permalink
ci: fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shayan-deriv committed Jun 11, 2024
1 parent 532ad48 commit d14eee2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/hooks/custom-hooks/useIsAdvertiser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const useIsAdvertiser = (): boolean => {
const [isAdvertiser, setIsAdvertiser] = useState(!error && !isEmptyObject(data));

useEffect(() => {
if (error && error?.error.code === ERROR_CODES.ADVERTISER_NOT_FOUND) {
if (error && error?.code === ERROR_CODES.ADVERTISER_NOT_FOUND) {
setIsAdvertiser(false);
} else if (!error && !isEmptyObject(data)) {
setIsAdvertiser(true);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/orders/screens/OrderDetails/OrderDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const OrderDetails = () => {
if (isLoading || (!orderInfo && !error)) return <Loader isFullScreen />;

// TODO: replace with proper error screen once design is ready
if (error) return <Text>{error?.error?.message}</Text>;
if (error) return <Text>{error?.message}</Text>;

if (isMobile) {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { createContext, PropsWithChildren, useContext } from 'react';
import { TSocketError } from 'types';

type TContextValue = {
error: TSocketError<'p2p_advertiser_info'> | undefined;
error: { code: string; message: string } | undefined;
isIdle: boolean;
isLoading: boolean;
isSubscribed: boolean;
Expand Down
1 change: 0 additions & 1 deletion src/routes/AppContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const AppContent = () => {
useEffect(() => {
if (hasCreatedAdvertiser) {
// Need to pass params to subscribeAdvertiserInfo to trigger the subscription.
// @ts-expect-error - passthrough is not a valid parameter
subscribeAdvertiserInfo({ passthrough: { createdNickname: 'nickname' } });
}
}, [hasCreatedAdvertiser, subscribeAdvertiserInfo]);
Expand Down

0 comments on commit d14eee2

Please sign in to comment.