diff --git a/src/categories/views/CategoryDetails.tsx b/src/categories/views/CategoryDetails.tsx index 7f80c39bd..8ae65d1d2 100644 --- a/src/categories/views/CategoryDetails.tsx +++ b/src/categories/views/CategoryDetails.tsx @@ -81,7 +81,7 @@ export const CategoryDetails: React.FC = ({ variables: { ...paginationState, id } }); - const { availableChannels, channel } = useAppChannel(); + const { availableChannels, channel } = useAppChannel(false); const channelChoices = mapNodeToChoice(availableChannels); diff --git a/src/collections/views/CollectionList/CollectionList.tsx b/src/collections/views/CollectionList/CollectionList.tsx index dd9c4fcfb..3d42a62e5 100644 --- a/src/collections/views/CollectionList/CollectionList.tsx +++ b/src/collections/views/CollectionList/CollectionList.tsx @@ -115,8 +115,8 @@ export const CollectionList: React.FC = ({ params }) => { } }); - const filterOpts = getFilterOpts(params, channelOpts); + const filterOpts = getFilterOpts(params, channelOpts); const tabs = getFilterTabs(); useEffect(() => { diff --git a/src/components/AppLayout/AppChannelSelect.tsx b/src/components/AppLayout/AppChannelSelect.tsx index ff075ac07..023758bc7 100644 --- a/src/components/AppLayout/AppChannelSelect.tsx +++ b/src/components/AppLayout/AppChannelSelect.tsx @@ -23,13 +23,11 @@ const useStyles = makeStyles( export interface AppChannelSelectProps extends ChannelProps { channels: ChannelFragment[]; - disabled: boolean; onChannelSelect: (id: string) => void; } const AppChannelSelect: React.FC = ({ channels, - disabled, onChannelSelect, selectedChannelId }) => { @@ -40,7 +38,6 @@ const AppChannelSelect: React.FC = ({ onChannelSelect(event.target.value)} /> diff --git a/src/components/AppLayout/AppLayout.tsx b/src/components/AppLayout/AppLayout.tsx index eff93ddcd..2aeeefa05 100644 --- a/src/components/AppLayout/AppLayout.tsx +++ b/src/components/AppLayout/AppLayout.tsx @@ -195,10 +195,9 @@ const AppLayout: React.FC = ({ children }) => { isMac={navigator.platform.toLowerCase().includes("mac")} onClick={() => setNavigatorVisibility(true)} /> - {channel && ( + {isPickerActive && ( diff --git a/src/discounts/views/VoucherDetails/VoucherDetails.tsx b/src/discounts/views/VoucherDetails/VoucherDetails.tsx index 31f0f45e8..f8bda40a8 100644 --- a/src/discounts/views/VoucherDetails/VoucherDetails.tsx +++ b/src/discounts/views/VoucherDetails/VoucherDetails.tsx @@ -126,7 +126,7 @@ export const VoucherDetails: React.FC = ({ VoucherUrlQueryParams >(navigate, params => voucherUrl(id, params), params); - const { channel, availableChannels } = useAppChannel(); + const { channel, availableChannels } = useAppChannel(false); const allChannels: ChannelVoucherData[] = createChannelsDataWithDiscountPrice( data?.voucher, diff --git a/src/orders/views/OrderDraftList/OrderDraftList.tsx b/src/orders/views/OrderDraftList/OrderDraftList.tsx index 87c777a16..778e7a240 100644 --- a/src/orders/views/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/views/OrderDraftList/OrderDraftList.tsx @@ -81,7 +81,7 @@ export const OrderDraftList: React.FC = ({ params }) => { onCompleted: handleCreateOrderCreateSuccess }); - const { channel, availableChannels } = useAppChannel(); + const { channel, availableChannels } = useAppChannel(false); const limitOpts = useShopLimitsQuery({ variables: { orders: true diff --git a/src/products/views/ProductUpdate/ProductUpdate.tsx b/src/products/views/ProductUpdate/ProductUpdate.tsx index 94334046b..725740b9e 100644 --- a/src/products/views/ProductUpdate/ProductUpdate.tsx +++ b/src/products/views/ProductUpdate/ProductUpdate.tsx @@ -164,7 +164,7 @@ export const ProductUpdate: React.FC = ({ id, params }) => { productVariantCreateOpts ] = useVariantCreateMutation({}); - const { availableChannels, channel } = useAppChannel(); + const { availableChannels, channel } = useAppChannel(false); const { data, loading, refetch } = useProductDetails({ displayLoader: true, variables: { diff --git a/src/shipping/views/ShippingZoneDetails/index.tsx b/src/shipping/views/ShippingZoneDetails/index.tsx index 3712d236c..dddd58501 100644 --- a/src/shipping/views/ShippingZoneDetails/index.tsx +++ b/src/shipping/views/ShippingZoneDetails/index.tsx @@ -73,7 +73,7 @@ const ShippingZoneDetails: React.FC = ({ displayLoader: true, variables: { id, ...paginationState } }); - const { availableChannels, channel } = useAppChannel(); + const { availableChannels, channel } = useAppChannel(false); const [openModal, closeModal] = createDialogActionHandlers< ShippingZoneUrlDialog,