diff --git a/src/components/config/ConfigProvider.tsx b/src/components/config/ConfigProvider.tsx index c45db94c7..abfd750d4 100644 --- a/src/components/config/ConfigProvider.tsx +++ b/src/components/config/ConfigProvider.tsx @@ -1,6 +1,7 @@ import { ProtocolConfig } from "@bosonprotocol/react-kit"; import { MagicProvider } from "components/magicLink/MagicContext"; import { + CONFIG, defaultEnvConfig, envConfigsFilteredByEnv, getDappConfig @@ -33,6 +34,8 @@ function SyncCurrentConfigId({ export function ConfigProvider({ children }: ConfigProviderProps) { const [envConfig, setEnvConfig] = useState(defaultEnvConfig); const dappConfig = getDappConfig(envConfig || defaultEnvConfig); + // TODO: change at core-component level + dappConfig.lens.ipfsGateway = CONFIG.ipfsGateway; return ( diff --git a/src/components/offers/OfferList.tsx b/src/components/offers/OfferList.tsx index bcee80c4b..9834d6378 100644 --- a/src/components/offers/OfferList.tsx +++ b/src/components/offers/OfferList.tsx @@ -7,6 +7,7 @@ import styled from "styled-components"; import { BosonRoutes } from "../../lib/routing/routes"; import { colors } from "../../lib/styles/colors"; import { Offer } from "../../lib/types/offer"; +import { Profile } from "../../lib/utils/hooks/lens/graphql/generated"; import { useKeepQueryParamsNavigate } from "../../lib/utils/hooks/useKeepQueryParamsNavigate"; import { useIsCustomStoreValueChanged } from "../../pages/custom-store/useIsCustomStoreValueChanged"; import { ExtendedOffer } from "../../pages/explore/WithAllOffers"; @@ -30,6 +31,10 @@ interface Props { itemsPerRow?: Partial; breadcrumbs?: boolean; numOffers: number; + seller: { + sellerId: string; + lensProfile?: Profile; + }; } const Container = styled.div<{ $isPrimaryBgChanged: boolean }>` @@ -61,7 +66,8 @@ export default function OfferList({ numOffers, showInvalidOffers, itemsPerRow, - breadcrumbs + breadcrumbs, + seller }: Props) { const isPrimaryBgChanged = useIsCustomStoreValueChanged("primaryBgColor"); const navigate = useKeepQueryParamsNavigate(); @@ -165,6 +171,7 @@ export default function OfferList({ key={offer.id} offer={offer} dataTestId="offer" + lensProfile={seller?.lensProfile} /> ) ); diff --git a/src/pages/profile/seller/Offers.tsx b/src/pages/profile/seller/Offers.tsx index f99fa2cb0..4e4610726 100644 --- a/src/pages/profile/seller/Offers.tsx +++ b/src/pages/profile/seller/Offers.tsx @@ -2,11 +2,15 @@ import { useMemo } from "react"; import { Action } from "../../../components/offer/OfferCard"; import OfferList from "../../../components/offers/OfferList"; +import { Profile } from "../../../lib/utils/hooks/lens/graphql/generated"; import { ExtendedSeller } from "../../explore/WithAllOffers"; interface Props { products: ExtendedSeller; - sellerId: string; + seller: { + sellerId: string; + lensProfile?: Profile; + }; action: Action; showInvalidOffers: boolean; isPrivateProfile: boolean; @@ -18,7 +22,8 @@ export default function Offers({ action, showInvalidOffers, isPrivateProfile, - isLoading + isLoading, + seller }: Props) { const allOffers = useMemo(() => { return products?.offers || []; @@ -41,6 +46,7 @@ export default function Offers({ l: 3, xl: 3 }} + seller={seller} /> ); } diff --git a/src/pages/profile/seller/Seller.tsx b/src/pages/profile/seller/Seller.tsx index 8661aa23a..040aac515 100644 --- a/src/pages/profile/seller/Seller.tsx +++ b/src/pages/profile/seller/Seller.tsx @@ -317,7 +317,7 @@ export default function Seller() { diff --git a/src/pages/profile/seller/Tabs.tsx b/src/pages/profile/seller/Tabs.tsx index f391ce0f0..2a44e41b4 100644 --- a/src/pages/profile/seller/Tabs.tsx +++ b/src/pages/profile/seller/Tabs.tsx @@ -7,6 +7,7 @@ import { AccountQueryParameters } from "../../../lib/routing/parameters"; import { useQueryParameter } from "../../../lib/routing/useQueryParameter"; import { breakpoint } from "../../../lib/styles/breakpoint"; import { colors } from "../../../lib/styles/colors"; +import { Profile } from "../../../lib/utils/hooks/lens/graphql/generated"; import { ExtendedSeller } from "../../explore/WithAllOffers"; import { ProfileSectionWrapper } from "../ProfilePage.styles"; import Exchanges from "./Exchanges"; @@ -110,7 +111,10 @@ const tabIdentifier = "id" as const; interface Props { products: ExtendedSeller; - sellerId: string; + seller: { + sellerId: string; + lensProfile?: Profile; + }; isErrorSellers: boolean; isPrivateProfile: boolean; isLoading: boolean; @@ -118,7 +122,7 @@ interface Props { export default function Tabs({ products, isPrivateProfile, - sellerId, + seller, isErrorSellers, isLoading }: Props) { @@ -130,7 +134,7 @@ export default function Tabs({ content: ( + content: }, { id: "redemptions", title: "Redemptions", - content: + content: } ]; return tabsData; - }, [sellerId, isPrivateProfile, products, isLoading]); + }, [seller, isPrivateProfile, products, isLoading]); const [currentTab, setCurrentTab] = useQueryParameter( AccountQueryParameters.tab );