diff --git a/src/pages/my-ads/components/AdTypeSection/AdTypeSection.scss b/src/pages/my-ads/components/AdTypeSection/AdTypeSection.scss
index 3b196072..2d9ec2c5 100644
--- a/src/pages/my-ads/components/AdTypeSection/AdTypeSection.scss
+++ b/src/pages/my-ads/components/AdTypeSection/AdTypeSection.scss
@@ -8,7 +8,7 @@
@include mobile-or-tablet-screen {
padding: 0 1.6rem;
overflow: auto;
- max-height: calc(100vh - 20rem);
+ max-height: calc(100% - 20rem);
}
&--edit {
diff --git a/src/pages/my-ads/components/AlertComponent/AlertComponent.scss b/src/pages/my-ads/components/AlertComponent/AlertComponent.scss
index 5c58e831..11dd18b4 100644
--- a/src/pages/my-ads/components/AlertComponent/AlertComponent.scss
+++ b/src/pages/my-ads/components/AlertComponent/AlertComponent.scss
@@ -14,4 +14,8 @@
margin-top: -0.4rem;
margin-left: 1rem;
}
+
+ & .tooltip-menu-icon:hover {
+ background: none;
+ }
}
diff --git a/src/pages/my-ads/components/AlertComponent/AlertComponent.tsx b/src/pages/my-ads/components/AlertComponent/AlertComponent.tsx
index 458d84ce..b0e296af 100644
--- a/src/pages/my-ads/components/AlertComponent/AlertComponent.tsx
+++ b/src/pages/my-ads/components/AlertComponent/AlertComponent.tsx
@@ -1,19 +1,26 @@
+import { TooltipMenuIcon } from '@/components/TooltipMenuIcon';
import { LegacyWarningIcon } from '@deriv/quill-icons';
-import { Button, Tooltip } from '@deriv-com/ui';
+import { useTranslations } from '@deriv-com/translations';
import './AlertComponent.scss';
type TAlertComponentProps = {
onClick: () => void;
};
-const AlertComponent = ({ onClick }: TAlertComponentProps) => (
-
-
-
+ );
+};
export default AlertComponent;
diff --git a/src/pages/my-ads/components/OrderTimeSelection/OrderTimeSelection.scss b/src/pages/my-ads/components/OrderTimeSelection/OrderTimeSelection.scss
index 442c9bde..17c3b3e3 100644
--- a/src/pages/my-ads/components/OrderTimeSelection/OrderTimeSelection.scss
+++ b/src/pages/my-ads/components/OrderTimeSelection/OrderTimeSelection.scss
@@ -1,5 +1,23 @@
.order-time-selection {
margin: 1rem 0;
+
+ & .deriv-dropdown {
+ &__items {
+ box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.16);
+ }
+ & .deriv-input__container {
+ width: 100%;
+ }
+
+ & .deriv-dropdown__items--xs {
+ margin-top: 0.5rem;
+ max-height: 20rem;
+
+ @include mobile-or-tablet-screen {
+ width: 100%;
+ }
+ }
+ }
}
@include mobile-or-tablet-screen {
diff --git a/src/pages/my-ads/components/OrderTimeSelection/OrderTimeSelection.tsx b/src/pages/my-ads/components/OrderTimeSelection/OrderTimeSelection.tsx
index 536201cf..07274636 100644
--- a/src/pages/my-ads/components/OrderTimeSelection/OrderTimeSelection.tsx
+++ b/src/pages/my-ads/components/OrderTimeSelection/OrderTimeSelection.tsx
@@ -73,7 +73,8 @@ const OrderTimeSelection = ({ orderExpiryOptions }: { orderExpiryOptions: TOrder
}
- list={getOptions()}
+ isFullWidth={isDesktop}
+ list={getOptions().sort((a, b) => a.value - b.value)}
name='order-completion-time'
onSelect={onChange}
shouldClearValue
diff --git a/src/pages/my-ads/components/PreferredCountriesSelector/PreferredCountriesSelector.scss b/src/pages/my-ads/components/PreferredCountriesSelector/PreferredCountriesSelector.scss
index bf4d4fba..97b0dc22 100644
--- a/src/pages/my-ads/components/PreferredCountriesSelector/PreferredCountriesSelector.scss
+++ b/src/pages/my-ads/components/PreferredCountriesSelector/PreferredCountriesSelector.scss
@@ -1,7 +1,6 @@
.preferred-countries-selector {
display: flex;
flex-direction: column;
- gap: 0.8rem;
&__field {
display: flex;
@@ -12,6 +11,10 @@
border: 1px solid #d6dadb;
padding: 1rem 1.6rem;
cursor: pointer;
+ border-radius: 4px;
+ @include mobile-or-tablet-screen {
+ width: 100%;
+ }
&__text {
width: 100%;
diff --git a/src/pages/my-ads/components/PreferredCountriesSelector/PreferredCountriesSelector.tsx b/src/pages/my-ads/components/PreferredCountriesSelector/PreferredCountriesSelector.tsx
index 1327725c..6c811078 100644
--- a/src/pages/my-ads/components/PreferredCountriesSelector/PreferredCountriesSelector.tsx
+++ b/src/pages/my-ads/components/PreferredCountriesSelector/PreferredCountriesSelector.tsx
@@ -40,7 +40,7 @@ const PreferredCountriesSelector = ({ countryList, type }: TPreferredCountriesSe
setIsModalOpen(true)}>
{getSelectedCountriesText()}
@@ -55,7 +55,10 @@ const PreferredCountriesSelector = ({ countryList, type }: TPreferredCountriesSe
setValue('preferred-countries', selectedValues);
setIsModalOpen(false);
}}
- onRequestClose={() => setIsModalOpen(false)}
+ onRequestClose={() => {
+ setSelectedValues(getValues('preferred-countries'));
+ setIsModalOpen(false);
+ }}
selectedCountries={selectedValues}
setSelectedCountries={setSelectedValues}
/>
diff --git a/src/pages/my-ads/components/SellAdPaymentSelection/SellAdPaymentSelection.scss b/src/pages/my-ads/components/SellAdPaymentSelection/SellAdPaymentSelection.scss
index de61d568..944857bd 100644
--- a/src/pages/my-ads/components/SellAdPaymentSelection/SellAdPaymentSelection.scss
+++ b/src/pages/my-ads/components/SellAdPaymentSelection/SellAdPaymentSelection.scss
@@ -2,6 +2,14 @@
&__card {
display: inline-flex;
flex-wrap: wrap;
+
+ @include desktop {
+ & .payment-method-card--medium {
+ height: 11.4rem;
+ width: 16rem;
+ min-height: unset;
+ }
+ }
@include mobile-or-tablet-screen {
flex-wrap: nowrap;
width: calc(100vw - 3.2rem);
@@ -34,11 +42,17 @@
border: 1px dashed #d6dadb;
min-height: 12.8rem;
+ @include desktop {
+ width: 16rem;
+ height: 11.4rem;
+ min-height: unset;
+ }
+
@include mobile-or-tablet-screen {
margin-right: 0;
- min-height: 8.8rem;
+ min-height: 10.6rem;
padding: 0.9rem 1rem;
- min-width: 13.6rem;
+ min-width: 15.4rem;
}
}
}
diff --git a/src/pages/my-ads/components/SellAdPaymentSelection/SellAdPaymentSelection.tsx b/src/pages/my-ads/components/SellAdPaymentSelection/SellAdPaymentSelection.tsx
index 42978326..7dd77406 100644
--- a/src/pages/my-ads/components/SellAdPaymentSelection/SellAdPaymentSelection.tsx
+++ b/src/pages/my-ads/components/SellAdPaymentSelection/SellAdPaymentSelection.tsx
@@ -14,7 +14,7 @@ type TSellAdPaymentSelectionProps = {
selectedPaymentMethodIds: number[];
};
const SellAdPaymentSelection = ({ onSelectPaymentMethod, selectedPaymentMethodIds }: TSellAdPaymentSelectionProps) => {
- const { isDesktop } = useDevice();
+ const { isDesktop, isMobile } = useDevice();
const isAdvertiser = useIsAdvertiser();
const { data: advertiserPaymentMethods, get } = api.advertiserPaymentMethods.useGet();
const { hideModal, isModalOpenFor, showModal } = useModalManager({ shouldReinitializeModals: false });
@@ -54,6 +54,7 @@ const SellAdPaymentSelection = ({ onSelectPaymentMethod, selectedPaymentMethodId
onSelectPaymentMethodCard={onSelectPaymentMethod}
paymentMethod={paymentMethod}
selectedPaymentMethodIds={selectedPaymentMethodIds}
+ textSize={isMobile ? 'md' : 'xs'}
/>
);
})}
@@ -65,7 +66,7 @@ const SellAdPaymentSelection = ({ onSelectPaymentMethod, selectedPaymentMethodId
>
-
+
diff --git a/src/pages/my-ads/screens/CreateEditAd/CreateEditAd.scss b/src/pages/my-ads/screens/CreateEditAd/CreateEditAd.scss
index 1ca54e89..08ab6bb4 100644
--- a/src/pages/my-ads/screens/CreateEditAd/CreateEditAd.scss
+++ b/src/pages/my-ads/screens/CreateEditAd/CreateEditAd.scss
@@ -3,4 +3,8 @@
max-height: calc(100vh - 19rem);
overflow-y: auto;
}
+
+ @include mobile-or-tablet-screen {
+ height: 100%;
+ }
}
diff --git a/src/pages/my-ads/screens/CreateEditAd/CreateEditAd.tsx b/src/pages/my-ads/screens/CreateEditAd/CreateEditAd.tsx
index 012fc863..6ae21626 100644
--- a/src/pages/my-ads/screens/CreateEditAd/CreateEditAd.tsx
+++ b/src/pages/my-ads/screens/CreateEditAd/CreateEditAd.tsx
@@ -23,6 +23,7 @@ const getSteps = (localize: TLocalize, isEdit = false) => {
return steps;
};
type FormValues = {
+ 'ad-rate-type': string;
'ad-type': 'buy' | 'sell';
amount: string;
'contact-details': string;
@@ -92,7 +93,9 @@ const CreateEditAd = () => {
formState: { isDirty },
getValues,
handleSubmit,
+ reset,
setValue,
+ trigger,
} = methods;
useEffect(() => {
if (Object.keys(countryList as object).length > 0 && getValues('preferred-countries').length === 0) {
@@ -100,6 +103,13 @@ const CreateEditAd = () => {
}
}, [countryList, getValues, setValue]);
+ useEffect(() => {
+ return () => {
+ reset();
+ };
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+
const shouldNotShowArchiveMessageAgain = LocalStorageUtils.getValue
(
LocalStorageConstants.p2pArchiveMessage
);
@@ -190,6 +200,7 @@ const CreateEditAd = () => {
const setFormValues = useCallback(
(formValues: TFormValuesInfo) => {
setValue('form-type', 'edit');
+ setValue('ad-rate-type', formValues.rate_type);
setValue('ad-type', formValues.type);
setValue('amount', formValues.amount.toString());
setValue('instructions', formValues.description);
@@ -211,6 +222,7 @@ const CreateEditAd = () => {
) ?? [];
setValue('payment-method', paymentMethodKeys);
}
+ trigger();
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[paymentMethodList, countryList]
@@ -233,7 +245,7 @@ const CreateEditAd = () => {
};
return (
- <>
+
);
};
diff --git a/src/pages/my-ads/screens/MyAds/MyAds.tsx b/src/pages/my-ads/screens/MyAds/MyAds.tsx
index 00c9754a..d7720417 100644
--- a/src/pages/my-ads/screens/MyAds/MyAds.tsx
+++ b/src/pages/my-ads/screens/MyAds/MyAds.tsx
@@ -10,7 +10,7 @@ const MyAds = () => {
if (!isPoaVerified || !isPoiVerified) return ;
return (
-
+
{isAdvertiserBarred && }
diff --git a/src/pages/my-ads/screens/MyAds/MyAdsTable/MyAdsDisplayWrapper.scss b/src/pages/my-ads/screens/MyAds/MyAdsTable/MyAdsDisplayWrapper.scss
new file mode 100644
index 00000000..3019929d
--- /dev/null
+++ b/src/pages/my-ads/screens/MyAds/MyAdsTable/MyAdsDisplayWrapper.scss
@@ -0,0 +1,25 @@
+.my-ads-display-wrapper {
+ & .mobile-wrapper__footer {
+ position: fixed;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ background-color: #fff;
+ z-index: 2;
+ }
+
+ &--barred {
+ & .mobile-wrapper__body {
+ & .my-ads-table__list {
+ & .table {
+ &__content {
+ @include mobile-or-tablet-screen {
+ // stylelint-disable-next-line declaration-no-important
+ height: calc(100% - 10rem) !important; //height of the inline message + toggle
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/pages/my-ads/screens/MyAds/MyAdsTable/MyAdsDisplayWrapper.tsx b/src/pages/my-ads/screens/MyAds/MyAdsTable/MyAdsDisplayWrapper.tsx
index d3fb70fa..24fd19ef 100644
--- a/src/pages/my-ads/screens/MyAds/MyAdsTable/MyAdsDisplayWrapper.tsx
+++ b/src/pages/my-ads/screens/MyAds/MyAdsTable/MyAdsDisplayWrapper.tsx
@@ -1,10 +1,13 @@
import { PropsWithChildren } from 'react';
+import clsx from 'clsx';
import { useHistory } from 'react-router-dom';
import { FullPageMobileWrapper } from '@/components';
import { MY_ADS_URL } from '@/constants';
+import { useIsAdvertiserBarred } from '@/hooks';
import { Localize } from '@deriv-com/translations';
import { Button, useDevice } from '@deriv-com/ui';
import { MyAdsToggle } from '../MyAdsToggle';
+import './MyAdsDisplayWrapper.scss';
type TMyAdsDisplayWrapperProps = {
isPaused: boolean;
@@ -13,6 +16,7 @@ type TMyAdsDisplayWrapperProps = {
const MyAdsDisplayWrapper = ({ children, isPaused, onClickToggle }: PropsWithChildren
) => {
const { isDesktop } = useDevice();
+ const isAdvertiserBarred = useIsAdvertiserBarred();
const history = useHistory();
const goToCreateAd = () => history.push(`${MY_ADS_URL}/adForm?formAction=create`);
@@ -20,12 +24,17 @@ const MyAdsDisplayWrapper = ({ children, isPaused, onClickToggle }: PropsWithChi
if (!isDesktop) {
return (
(
-