diff --git a/package-lock.json b/package-lock.json
index 56996bc22..0fca83cdb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -44,12 +44,12 @@
"decentraland-builder-scripts": "^0.24.0",
"decentraland-connect": "^7.3.2",
"decentraland-crypto-fetch": "^2.0.1",
- "decentraland-dapps": "^23.22.0",
+ "decentraland-dapps": "^23.24.0",
"decentraland-ecs": "6.12.4-7784644013.commit-f770b3e",
"decentraland-experiments": "^1.0.2",
"decentraland-transactions": "^2.16.0",
"decentraland-ui": "^6.12.1",
- "decentraland-ui2": "^0.8.7",
+ "decentraland-ui2": "^0.9.2",
"ethers": "^5.6.8",
"file-saver": "^2.0.1",
"graphql": "^15.8.0",
@@ -1376,6 +1376,32 @@
"pbts": "bin/pbts"
}
},
+ "node_modules/@contentful/rich-text-react-renderer": {
+ "version": "16.0.1",
+ "resolved": "https://registry.npmjs.org/@contentful/rich-text-react-renderer/-/rich-text-react-renderer-16.0.1.tgz",
+ "integrity": "sha512-7wZZBMgwbq5Udp2KebKCJoh9K+EPGlgRkudhXSp+OxtAIdBC6JUz3Oi9kXXKYKLeSg7iTBpkO1dd0/xFjHHKbg==",
+ "dependencies": {
+ "@contentful/rich-text-types": "^17.0.0"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8.6 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-dom": "^16.8.6 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/@contentful/rich-text-types": {
+ "version": "17.0.0",
+ "resolved": "https://registry.npmjs.org/@contentful/rich-text-types/-/rich-text-types-17.0.0.tgz",
+ "integrity": "sha512-x50t6sILzFHBdFpAo0foJRnH8fHWyidheWhAv3uwt9aOnNqTh893gxyoc3Q0RVEZxXfHpTi+O9gmakHcdlRdTA==",
+ "dependencies": {
+ "is-plain-obj": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
"node_modules/@cosmjs/amino": {
"version": "0.31.3",
"resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.31.3.tgz",
@@ -3066,9 +3092,9 @@
}
},
"node_modules/@dcl/schemas": {
- "version": "15.4.0",
- "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-15.4.0.tgz",
- "integrity": "sha512-pRR81kg9o9FFTWBTn3aslgGdBrRnUWFpLu9lwrEJr/5J2rhmHDzeeBTlr7x+0r3qnzzNVOLndOurtgM3/HzqeA==",
+ "version": "15.6.0",
+ "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-15.6.0.tgz",
+ "integrity": "sha512-YBX9pqANci2bNmEpa+T48KYHg0dLz7gaNolwECjqXPWrwQZbNMlcz2vvU4+ZlOyMY2RwJxlz8NJSCyZfS23x1A==",
"dependencies": {
"ajv": "^8.11.0",
"ajv-errors": "^3.0.0",
@@ -12500,14 +12526,14 @@
}
},
"node_modules/decentraland-dapps": {
- "version": "23.22.0",
- "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-23.22.0.tgz",
- "integrity": "sha512-tmZRa3BKyi1R9GTS7UtCDux2v7gASB9ZANbcX8qf0xhblli5f4zOvuvdZ3h4aHszdMjTlJUI7dQkP5crm3eYAw==",
+ "version": "23.24.0",
+ "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-23.24.0.tgz",
+ "integrity": "sha512-ft1zx0XieX6TWuRjo6sC8/m6QKYpxxxxILvrxTQwROM+nTUS5sAwF1/QxczccfwSPKXxzPtEphJ7Qt1WkhWiLw==",
"dependencies": {
"@0xsequence/multicall": "^0.25.1",
"@0xsequence/relayer": "^0.25.1",
"@dcl/crypto": "^3.3.1",
- "@dcl/schemas": "^15.1.2",
+ "@dcl/schemas": "^15.6.0",
"@dcl/single-sign-on-client": "^0.1.0",
"@dcl/ui-env": "^1.5.0",
"@transak/transak-sdk": "^3.1.3",
@@ -12522,7 +12548,7 @@
"decentraland-crypto-fetch": "^2.0.1",
"decentraland-transactions": "^2.18.0",
"decentraland-ui": "^6.11.0",
- "decentraland-ui2": "^0.8.7",
+ "decentraland-ui2": "^0.9.2",
"ethers": "^5.6.8",
"events": "^3.3.0",
"flat": "^5.0.2",
@@ -13006,11 +13032,12 @@
}
},
"node_modules/decentraland-ui2": {
- "version": "0.8.7",
- "resolved": "https://registry.npmjs.org/decentraland-ui2/-/decentraland-ui2-0.8.7.tgz",
- "integrity": "sha512-MT3Ife/jG1sn9OrSbdSyMGd+XTcLqGP2xfu7FcVAqfGk9JLbRP+QUb5+4LInDApGqMq+v374K+s35vgsDwLB+A==",
+ "version": "0.9.2",
+ "resolved": "https://registry.npmjs.org/decentraland-ui2/-/decentraland-ui2-0.9.2.tgz",
+ "integrity": "sha512-5mCgR6wQ9KEcbb4SAMhNe5lx3DABH9sewKxD1Qy3+Ap3kMM7mH5iuDVHBvHnfBtHdD5iHNFzdbIUdGbprN1XJA==",
"dependencies": {
- "@dcl/schemas": "^13.9.0",
+ "@contentful/rich-text-react-renderer": "^16.0.1",
+ "@dcl/schemas": "^15.6.0",
"@dcl/ui-env": "^1.5.1",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
@@ -13025,17 +13052,6 @@
"react-tile-map": "^0.4.1"
}
},
- "node_modules/decentraland-ui2/node_modules/@dcl/schemas": {
- "version": "13.13.0",
- "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-13.13.0.tgz",
- "integrity": "sha512-UY7YY7pn0TxSrinO5nayBushF5Sf1jcBpbsLdw4wWOq7urhzSQZGjbAomgJZ7UfOMi1C7DD2XaTZ89BCp/4Z9Q==",
- "dependencies": {
- "ajv": "^8.11.0",
- "ajv-errors": "^3.0.0",
- "ajv-keywords": "^5.1.0",
- "mitt": "^3.0.1"
- }
- },
"node_modules/decentraland-ui2/node_modules/date-fns": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
@@ -16723,7 +16739,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
"integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
- "dev": true,
"engines": {
"node": ">=10"
},
diff --git a/package.json b/package.json
index f7b94dd51..718c5d74e 100644
--- a/package.json
+++ b/package.json
@@ -38,12 +38,12 @@
"decentraland-builder-scripts": "^0.24.0",
"decentraland-connect": "^7.3.2",
"decentraland-crypto-fetch": "^2.0.1",
- "decentraland-dapps": "^23.22.0",
+ "decentraland-dapps": "^23.24.0",
"decentraland-ecs": "6.12.4-7784644013.commit-f770b3e",
"decentraland-experiments": "^1.0.2",
"decentraland-transactions": "^2.16.0",
"decentraland-ui": "^6.12.1",
- "decentraland-ui2": "^0.8.7",
+ "decentraland-ui2": "^0.9.2",
"ethers": "^5.6.8",
"file-saver": "^2.0.1",
"graphql": "^15.8.0",
@@ -160,4 +160,4 @@
"decentraland-ecs": "6.12.4-7784644013.commit-f770b3e",
"decentraland": "3.3.0"
}
-}
+}
\ No newline at end of file
diff --git a/src/components/CollectionsPage/CollectionsPage.css b/src/components/CollectionsPage/CollectionsPage.css
index a95f50285..a86b04aaf 100644
--- a/src/components/CollectionsPage/CollectionsPage.css
+++ b/src/components/CollectionsPage/CollectionsPage.css
@@ -215,3 +215,7 @@
flex-direction: row;
gap: 8px;
}
+
+.CollectionsPage .banner-container {
+ margin-bottom: 24px;
+}
diff --git a/src/components/CollectionsPage/CollectionsPage.tsx b/src/components/CollectionsPage/CollectionsPage.tsx
index 1502e43f0..ce42a2866 100644
--- a/src/components/CollectionsPage/CollectionsPage.tsx
+++ b/src/components/CollectionsPage/CollectionsPage.tsx
@@ -20,16 +20,17 @@ import {
Icon as UIIcon
} from 'decentraland-ui'
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
+import { Banner } from 'decentraland-dapps/dist/containers/Banner'
import { NavigationTab } from 'components/Navigation/Navigation.types'
import LoggedInDetailPage from 'components/LoggedInDetailPage'
import Icon from 'components/Icon'
import Chip from 'components/Chip'
-import EventBanner from 'components/EventBanner'
import { locations } from 'routing/locations'
import { CollectionPageView } from 'modules/ui/collection/types'
import { CurationSortOptions } from 'modules/curations/types'
import { usePagination } from 'lib/pagination'
import { CollectionType } from 'modules/collection/types'
+import { BUILDER_BANNER_ID } from 'modules/common/banners'
import collectionsIcon from 'icons/collections.svg'
import ItemCard from './ItemCard'
import ItemRow from './ItemRow'
@@ -296,7 +297,9 @@ export default function CollectionsPage(props: Props) {
return (
<>
-
+
+
+
{(hasUserOrphanItems || isThirdPartyManager || isLinkedWearablesPaymentsEnabled) && (
diff --git a/src/components/CurationPage/CurationPage.container.ts b/src/components/CurationPage/CurationPage.container.ts
index b2269b3c8..cdb5520ff 100644
--- a/src/components/CurationPage/CurationPage.container.ts
+++ b/src/components/CurationPage/CurationPage.container.ts
@@ -1,5 +1,6 @@
import { connect } from 'react-redux'
import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors'
+import { getMainTag, getContentfulNormalizedLocale, getCampaignName } from 'decentraland-dapps/dist/modules/campaign'
import { getData as getWallet, isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors'
import { RootState } from 'modules/common/types'
import { getIsCampaignEnabled } from 'modules/features/selectors'
@@ -29,7 +30,9 @@ const mapState = (state: RootState): MapStateProps => {
isLoadingCollectionsData:
isLoadingType(getLoadingCollection(state), FETCH_COLLECTIONS_REQUEST) ||
isLoadingType(getLoadingCuration(state), FETCH_COLLECTION_CURATION_REQUEST),
- isCampaignEnabled: getIsCampaignEnabled(state)
+ isCampaignEnabled: getIsCampaignEnabled(state),
+ campaignTag: getMainTag(state),
+ campaignName: getCampaignName(state)?.[getContentfulNormalizedLocale(state)]
}
}
diff --git a/src/components/CurationPage/CurationPage.tsx b/src/components/CurationPage/CurationPage.tsx
index 0b377164b..c4a2fb5f3 100644
--- a/src/components/CurationPage/CurationPage.tsx
+++ b/src/components/CurationPage/CurationPage.tsx
@@ -38,7 +38,6 @@ import './CurationPage.css'
const PAGE_SIZE = 12
const ALL_ASSIGNEES_KEY = 'all'
-const CAMPAIGN_TAG = 'DCLMF24'
export default class CurationPage extends React.PureComponent {
state: State = {
@@ -120,11 +119,16 @@ export default class CurationPage extends React.PureComponent {
}
handleOnCampaignToggleChange = (_event: React.FormEvent, checkboxProps: CheckboxProps) => {
+ const { campaignTag } = this.props
const { checked } = checkboxProps
+ if (!campaignTag) {
+ return
+ }
+
if (checked) {
- this.updateParam({ filterByTags: [...this.state.filterByTags, CAMPAIGN_TAG] })
+ this.updateParam({ filterByTags: [...this.state.filterByTags, campaignTag] })
} else {
- this.updateParam({ filterByTags: [...this.state.filterByTags.filter(tag => tag !== CAMPAIGN_TAG)] })
+ this.updateParam({ filterByTags: [...this.state.filterByTags.filter(tag => tag !== campaignTag)] })
}
}
@@ -212,21 +216,21 @@ export default class CurationPage extends React.PureComponent {
}
renderCampaignFilterToggle = () => {
+ const { isCampaignEnabled, campaignName, campaignTag } = this.props
const { filterByTags } = this.state
- return (
+ return isCampaignEnabled && campaignName && campaignTag ? (
- )
+ ) : null
}
renderPage() {
- const { isLoadingCollectionsData, isLoadingCommittee, collections, curationsByCollectionId, paginationData, isCampaignEnabled } =
- this.props
+ const { isLoadingCollectionsData, isLoadingCommittee, collections, curationsByCollectionId, paginationData } = this.props
const { page, searchText } = this.state
const totalCurations = paginationData?.total
const totalPages = paginationData?.totalPages
@@ -252,7 +256,7 @@ export default class CurationPage extends React.PureComponent {
- {isCampaignEnabled ? this.renderCampaignFilterToggle() : null}
+ {this.renderCampaignFilterToggle()}
{this.renderAssigneeFilterDropdown()}
{this.renderTypesFilterDropdown()}
{this.renderStatusFilterDropdown()}
diff --git a/src/components/CurationPage/CurationPage.types.ts b/src/components/CurationPage/CurationPage.types.ts
index fab6773e2..7776da5ec 100644
--- a/src/components/CurationPage/CurationPage.types.ts
+++ b/src/components/CurationPage/CurationPage.types.ts
@@ -34,6 +34,8 @@ export type Props = {
isLoadingCollectionsData: boolean
isLoadingCommittee: boolean
isCampaignEnabled: boolean
+ campaignTag?: string
+ campaignName?: string
onNavigate: (path: string) => void
onFetchCollections: (params?: FetchCollectionsParams) => ReturnType>
}
@@ -60,6 +62,8 @@ export type MapStateProps = Pick<
| 'isLoadingCollectionsData'
| 'isLoadingCommittee'
| 'isCampaignEnabled'
+ | 'campaignTag'
+ | 'campaignName'
>
export type MapDispatchProps = Pick
diff --git a/src/components/EventBanner/EventBanner.container.ts b/src/components/EventBanner/EventBanner.container.ts
deleted file mode 100644
index de5da9ce5..000000000
--- a/src/components/EventBanner/EventBanner.container.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { connect } from 'react-redux'
-import { RootState } from 'modules/common/types'
-import { getIsCampaignEnabled } from '../../modules/features/selectors'
-import { MapStateProps } from './EventBanner.types'
-import EventBanner from './EventBanner'
-
-const mapState = (state: RootState): MapStateProps => ({
- isCampaignEnabled: getIsCampaignEnabled(state)
-})
-
-export default connect(mapState, {})(EventBanner)
diff --git a/src/components/EventBanner/EventBanner.css b/src/components/EventBanner/EventBanner.css
deleted file mode 100644
index 57daabcd2..000000000
--- a/src/components/EventBanner/EventBanner.css
+++ /dev/null
@@ -1,55 +0,0 @@
-.EventBanner {
- width: 100%;
- padding: 40px;
- display: flex;
- background-image: url('./banner.webp');
- background-size: cover;
- background-position: center;
- flex-direction: row;
- justify-content: space-between;
- gap: 35px;
- text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25);
- align-items: center;
- min-height: 200px;
- margin-bottom: 20px;
-}
-
-@media (max-width: 1400px) {
- .EventBanner {
- background-image: url(./banner-1400x300.webp);
- }
-}
-
-@media (max-width: 1600px) {
- .EventBanner {
- background-image: url(./banner-1600x300.webp);
- }
-}
-
-.EventBanner .event-banner-text {
- display: flex;
- flex-direction: column;
- color: white;
- font-size: 15px;
- font-weight: 600;
- line-height: 26px;
- gap: 10px;
- max-width: 700px;
-}
-
-.EventBanner .event-banner-logo {
- width: 450px;
-}
-
-.EventBanner .title {
- font-size: 28px;
- line-height: 32px;
- font-weight: 800;
- margin-bottom: 10px;
-}
-
-.EventBanner .subtitle {
- overflow-wrap: break-word;
- font-size: 18px;
- font-weight: 400;
-}
diff --git a/src/components/EventBanner/EventBanner.tsx b/src/components/EventBanner/EventBanner.tsx
deleted file mode 100644
index 8de202cae..000000000
--- a/src/components/EventBanner/EventBanner.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import React from 'react'
-import { t } from 'decentraland-dapps/dist/modules/translation/utils'
-import { Props } from './EventBanner.types'
-import logo from './logo.webp'
-import './EventBanner.css'
-
-const EventBanner = ({ isCampaignEnabled }: Props) => {
- return isCampaignEnabled ? (
-
-
- {t('event_banner.small.title')}
-
- {t('event_banner.small.subtitle', {
- event_tag: t('event_banner.event_tag'),
- enter:
- })}
-
-
-
![{t('event_banner.event_tag')}]({logo})
-
- ) : null
-}
-
-export default React.memo(EventBanner)
diff --git a/src/components/EventBanner/EventBanner.types.tsx b/src/components/EventBanner/EventBanner.types.tsx
deleted file mode 100644
index 81955d596..000000000
--- a/src/components/EventBanner/EventBanner.types.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-export type Props = {
- isCampaignEnabled: boolean
-}
-
-export type MapStateProps = Pick
diff --git a/src/components/EventBanner/banner-1400x300.webp b/src/components/EventBanner/banner-1400x300.webp
deleted file mode 100644
index fa31daf35..000000000
Binary files a/src/components/EventBanner/banner-1400x300.webp and /dev/null differ
diff --git a/src/components/EventBanner/banner-1600x300.webp b/src/components/EventBanner/banner-1600x300.webp
deleted file mode 100644
index 67ec47c78..000000000
Binary files a/src/components/EventBanner/banner-1600x300.webp and /dev/null differ
diff --git a/src/components/EventBanner/banner.webp b/src/components/EventBanner/banner.webp
deleted file mode 100644
index a4c282007..000000000
Binary files a/src/components/EventBanner/banner.webp and /dev/null differ
diff --git a/src/components/EventBanner/index.tsx b/src/components/EventBanner/index.tsx
deleted file mode 100644
index 11c476409..000000000
--- a/src/components/EventBanner/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import EventBanner from './EventBanner.container'
-
-export default EventBanner
diff --git a/src/components/EventBanner/logo.webp b/src/components/EventBanner/logo.webp
deleted file mode 100644
index 907abc6f6..000000000
Binary files a/src/components/EventBanner/logo.webp and /dev/null differ
diff --git a/src/components/HomePage/HomePage.tsx b/src/components/HomePage/HomePage.tsx
index 74b444abd..4de0eac1a 100644
--- a/src/components/HomePage/HomePage.tsx
+++ b/src/components/HomePage/HomePage.tsx
@@ -3,20 +3,20 @@ import { useHistory } from 'react-router-dom'
import classNames from 'classnames'
import { Button, Card, Container, Page } from 'decentraland-ui'
import { getLocalStorage } from 'decentraland-dapps/dist/lib/localStorage'
+import { Banner } from 'decentraland-dapps/dist/containers/Banner'
import { t } from 'decentraland-dapps/dist/modules/translation/utils'
import Footer from 'components/Footer'
import Navbar from 'components/Navbar'
import LoadingPage from 'components/LoadingPage'
import SyncToast from 'components/SyncToast'
import Navigation from 'components/Navigation'
-import EventBannerContainer from 'components/EventBanner/EventBanner.container'
import { NavigationTab } from 'components/Navigation/Navigation.types'
+import { BUILDER_BANNER_ID } from 'modules/common/banners'
import { locations } from 'routing/locations'
import { Props } from './HomePage.types'
import './HomePage.css'
export const LOCALSTORAGE_LAST_VISITED_SECTION_KEY = 'builder-last-visited-section'
-
const localStorage = getLocalStorage()
const cards = [NavigationTab.COLLECTIONS, NavigationTab.SCENES, NavigationTab.LAND, NavigationTab.NAMES]
@@ -80,7 +80,7 @@ export const HomePage: React.FC = props => {
-
+
{t('home_page.title')}
diff --git a/src/components/ItemEditorPage/RightPanel/RightPanel.container.ts b/src/components/ItemEditorPage/RightPanel/RightPanel.container.ts
index a4b00f0c9..a2157486b 100644
--- a/src/components/ItemEditorPage/RightPanel/RightPanel.container.ts
+++ b/src/components/ItemEditorPage/RightPanel/RightPanel.container.ts
@@ -1,5 +1,6 @@
import { connect } from 'react-redux'
import { getAddress, isConnected } from 'decentraland-dapps/dist/modules/wallet/selectors'
+import { getCampaignName, getContentfulNormalizedLocale, getMainTag } from 'decentraland-dapps/dist/modules/campaign'
import { RootState } from 'modules/common/types'
import { getItem, getError as getItemError, getStatusByItemId, isDownloading } from 'modules/item/selectors'
import { deleteItemRequest, downloadItemRequest, saveItemRequest } from 'modules/item/actions'
@@ -35,6 +36,8 @@ const mapState = (state: RootState): MapStateProps => {
isDownloading: isDownloading(state),
isCommitteeMember: isWalletCommitteeMember(state),
isCampaignEnabled: getIsCampaignEnabled(state),
+ campaignTag: getMainTag(state),
+ campaignName: getCampaignName(state)?.[getContentfulNormalizedLocale(state)],
isVrmOptOutEnabled: getIsVrmOptOutEnabled(state),
isWearableUtilityEnabled: getIsWearableUtilityEnabled(state)
}
diff --git a/src/components/ItemEditorPage/RightPanel/RightPanel.tsx b/src/components/ItemEditorPage/RightPanel/RightPanel.tsx
index a7737b8f3..ecc3cdee2 100644
--- a/src/components/ItemEditorPage/RightPanel/RightPanel.tsx
+++ b/src/components/ItemEditorPage/RightPanel/RightPanel.tsx
@@ -52,8 +52,6 @@ import Tags from './Tags'
import { Props, State } from './RightPanel.types'
import './RightPanel.css'
-const CAMPAIGN_TAG = 'DCLMF24'
-
export default class RightPanel extends React.PureComponent {
analytics = getAnalytics()
state: State = this.getInitialState()
@@ -522,7 +520,17 @@ export default class RightPanel extends React.PureComponent {
}
render() {
- const { selectedItemId, address, isWearableUtilityEnabled, isConnected, error, isCampaignEnabled, isVrmOptOutEnabled } = this.props
+ const {
+ selectedItemId,
+ address,
+ isWearableUtilityEnabled,
+ isConnected,
+ error,
+ isCampaignEnabled,
+ isVrmOptOutEnabled,
+ campaignName,
+ campaignTag
+ } = this.props
const { name, description, utility, rarity, data, isDirty, hasItem } = this.state
const rarities = Rarity.getRarities()
const playModes = getEmotePlayModes()
@@ -660,11 +668,11 @@ export default class RightPanel extends React.PureComponent {
{item ? (
<>
- {isCampaignEnabled && canEditItemMetadata && (
+ {isCampaignEnabled && campaignName && campaignTag && canEditItemMetadata && (
{t('item_editor.right_panel.event_tag', {
- event_tag: {CAMPAIGN_TAG},
- event_name: {t('campaign.name')}
+ event_tag: {campaignTag},
+ event_name: {campaignName}
})}
)}
diff --git a/src/components/ItemEditorPage/RightPanel/RightPanel.types.ts b/src/components/ItemEditorPage/RightPanel/RightPanel.types.ts
index 062cfbbc1..9c33a1705 100644
--- a/src/components/ItemEditorPage/RightPanel/RightPanel.types.ts
+++ b/src/components/ItemEditorPage/RightPanel/RightPanel.types.ts
@@ -24,6 +24,8 @@ export type Props = {
isDownloading: boolean
isCommitteeMember: boolean
isCampaignEnabled: boolean
+ campaignTag?: string
+ campaignName?: string
isVrmOptOutEnabled: boolean
isWearableUtilityEnabled: boolean
onSaveItem: typeof saveItemRequest
@@ -58,6 +60,8 @@ export type MapStateProps = Pick<
| 'isCommitteeMember'
| 'canEditSelectedItem'
| 'isCampaignEnabled'
+ | 'campaignTag'
+ | 'campaignName'
| 'isVrmOptOutEnabled'
| 'isWearableUtilityEnabled'
>
diff --git a/src/config/env/dev.json b/src/config/env/dev.json
index 3b45ff7ad..b2b4fbb7f 100644
--- a/src/config/env/dev.json
+++ b/src/config/env/dev.json
@@ -45,5 +45,9 @@
"AUTH_URL": "/auth",
"MARKETPLACE_SERVER_URL": "https://marketplace-api.decentraland.zone/v1",
"WERT_PUBLISH_FEES_ENV": "dev",
- "PEER_TESTING_URL": "https://peer-testing.decentraland.org"
+ "PEER_TESTING_URL": "https://peer-testing.decentraland.org",
+ "CONTENTFUL_ACCESS_TOKEN": "AATjg5ZJgxllQW8PBSQV4ZaY5wh9W_lQSKIiERHY-sc",
+ "CONTENTFUL_ENVIRONMENT": "development",
+ "CONTENTFUL_SPACE_ID": "ea2ybdmmn1kv",
+ "CONTENTFUL_ADMIN_ENTITY_ID": "3mvjCEsGUUqL22BY1vZLmZ"
}
diff --git a/src/index.css b/src/index.css
index 1aeadc62b..1788cd8a8 100644
--- a/src/index.css
+++ b/src/index.css
@@ -17,6 +17,7 @@ body {
#root {
height: 100%;
max-height: 100vh;
+ overflow: auto;
}
code {
diff --git a/src/modules/common/banners.ts b/src/modules/common/banners.ts
new file mode 100644
index 000000000..5cce548c4
--- /dev/null
+++ b/src/modules/common/banners.ts
@@ -0,0 +1,3 @@
+const BUILDER_BANNER_ID = 'builderCampaignBanner'
+
+export { BUILDER_BANNER_ID }
diff --git a/src/modules/common/reducer.ts b/src/modules/common/reducer.ts
index a1ae165b1..8ad1aad23 100644
--- a/src/modules/common/reducer.ts
+++ b/src/modules/common/reducer.ts
@@ -11,6 +11,7 @@ import { translationReducer as translation } from 'decentraland-dapps/dist/modul
import { walletReducer as wallet } from 'decentraland-dapps/dist/modules/wallet/reducer'
import { featuresReducer as features } from 'decentraland-dapps/dist/modules/features/reducer'
import { gatewayReducer as gateway } from 'decentraland-dapps/dist/modules/gateway/reducer'
+import { campaignReducer as campaign } from 'decentraland-dapps/dist/modules/campaign'
import { RootState } from 'modules/common/types'
import { assetPackReducer as assetPack } from 'modules/assetPack/reducer'
@@ -43,6 +44,7 @@ export function createRootReducer(history: History) {
return storageReducerWrapper(
combineReducers({
asset,
+ campaign,
assetPack,
authorization,
collection,
diff --git a/src/modules/common/sagas.ts b/src/modules/common/sagas.ts
index 09265d1c0..0c0bf6fb8 100644
--- a/src/modules/common/sagas.ts
+++ b/src/modules/common/sagas.ts
@@ -11,6 +11,8 @@ import { toastSaga } from 'decentraland-dapps/dist/modules/toast/sagas'
import { featuresSaga } from 'decentraland-dapps/dist/modules/features/sagas'
import { createIdentitySaga } from 'decentraland-dapps/dist/modules/identity/sagas'
import { FiatGateway, createGatewaySaga } from 'decentraland-dapps/dist/modules/gateway'
+import { TradeService } from 'decentraland-dapps/dist/modules/trades/TradeService'
+import { ContentfulClient, campaignSagas } from 'decentraland-dapps/dist/modules/campaign'
import { analyticsSaga } from 'modules/analytics/sagas'
import { assetPackSaga } from 'modules/assetPack/sagas'
@@ -53,7 +55,6 @@ import { config } from 'config'
import { getPeerWithNoGBCollectorURL } from './utils'
import { RootStore } from './types'
import { WorldsAPI } from 'lib/api/worlds'
-import { TradeService } from 'decentraland-dapps/dist/modules/trades/TradeService'
const newIdentitySaga = createIdentitySaga({
authURL: config.get('AUTH_URL')
@@ -70,6 +71,7 @@ export function* rootSaga(
builderAPI: BuilderAPI,
newBuilderClient: BuilderClient,
catalystClient: CatalystClient,
+ contentfulClient: ContentfulClient,
getIdentity: () => AuthIdentity | undefined,
store: RootStore,
ensApi: ENSApi,
@@ -78,6 +80,12 @@ export function* rootSaga(
) {
yield all([
analyticsSaga(),
+ campaignSagas(contentfulClient, {
+ space: config.get('CONTENTFUL_SPACE_ID'),
+ environment: config.get('CONTENTFUL_ENVIRONMENT'),
+ id: config.get('CONTENTFUL_ADMIN_ENTITY_ID'),
+ token: config.get('CONTENTFUL_ACCESS_TOKEN')
+ }),
assetPackSaga(builderAPI),
assetSaga(newBuilderClient),
authorizationSaga(),
diff --git a/src/modules/common/store.ts b/src/modules/common/store.ts
index b281ad560..e8779c776 100644
--- a/src/modules/common/store.ts
+++ b/src/modules/common/store.ts
@@ -16,6 +16,7 @@ import { configure as configureAnalytics } from 'decentraland-dapps/dist/modules
import { getOpenModals } from 'decentraland-dapps/dist/modules/modal/selectors'
import { openModal } from 'decentraland-dapps/dist/modules/modal/actions'
import { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors'
+import { ContentfulClient, fetchCampaignRequest } from 'decentraland-dapps/dist/modules/campaign'
import { PROVISION_SCENE, CREATE_SCENE } from 'modules/scene/actions'
import { DEPLOY_TO_LAND_SUCCESS, CLEAR_DEPLOYMENT_SUCCESS } from 'modules/deployment/actions'
@@ -175,9 +176,21 @@ const newBuilderClient = new BuilderClient(builderClientUrl, getClientAuthAuthor
const ensApi = new ENSApi(config.get('ENS_SUBGRAPH_URL'))
const worldsAPI = new WorldsAPI(new Authorization(() => getAddress(store.getState())))
+const contentfulClient = new ContentfulClient()
const tradeService = new TradeService('dcl:builder', config.get('MARKETPLACE_API'), getClientAuthAuthority)
-sagasMiddleware.run(rootSaga, builderAPI, newBuilderClient, catalystClient, getClientAuthAuthority, store, ensApi, worldsAPI, tradeService)
+sagasMiddleware.run(
+ rootSaga,
+ builderAPI,
+ newBuilderClient,
+ catalystClient,
+ contentfulClient,
+ getClientAuthAuthority,
+ store,
+ ensApi,
+ worldsAPI,
+ tradeService
+)
loadStorageMiddleware(store)
if (isDevelopment) {
@@ -192,5 +205,6 @@ window.onbeforeunload = function () {
}
store.dispatch(fetchTilesRequest())
+store.dispatch(fetchCampaignRequest())
export { store, history }
diff --git a/src/modules/common/types.ts b/src/modules/common/types.ts
index 3caab1882..3279b6112 100644
--- a/src/modules/common/types.ts
+++ b/src/modules/common/types.ts
@@ -11,6 +11,7 @@ import { WalletState } from 'decentraland-dapps/dist/modules/wallet/reducer'
import { FeaturesState } from 'decentraland-dapps/dist/modules/features/reducer'
import { STORAGE_LOAD } from 'decentraland-dapps/dist/modules/storage/actions'
import { GatewayState } from 'decentraland-dapps/dist/modules/gateway'
+import { CampaignState } from 'decentraland-dapps/dist/modules/campaign'
import { AssetPackState } from 'modules/assetPack/reducer'
import { AssetState } from 'modules/asset/reducer'
@@ -44,6 +45,7 @@ export type StorageLoadAction = ReturnType
export type RootState = {
asset: AssetState
+ campaign: CampaignState
assetPack: AssetPackState
authorization: AuthorizationState
collection: CollectionState
diff --git a/src/modules/translation/languages/en.json b/src/modules/translation/languages/en.json
index 358a28c25..551af28d8 100644
--- a/src/modules/translation/languages/en.json
+++ b/src/modules/translation/languages/en.json
@@ -2324,17 +2324,6 @@
"subtitle": "Thank you for revieweing this collection"
}
},
- "event_banner": {
- "small": {
- "title": "Create for Decentraland Music Festival!",
- "subtitle": "Add the {event_tag} tag for your space-themed Wearables and Emotes and they'll be featured in a special Festival Tab on the Marketplace!"
- },
- "event_tag": "DCLMF24"
- },
- "campaign": {
- "name": "Decentraland Music Festival",
- "tag": "DCLMF24"
- },
"logged_in_detail_page": {
"error_title": "An error ocurred while loading the detail page"
},
@@ -2342,7 +2331,7 @@
"title": "Introducing Handwear",
"subtitle": "A new Wearable category for all your hand-enhancing creations",
"img_alt": "New Handwear category",
- "description": "Update your hand Wearables to the new category in the Editor once you’ve modified them accordingly. Please note, the Handwear category is for hand accessories or Wearables that replace hands with other functionally similar ones, not for items that are held.",
+ "description": "Update your hand Wearables to the new category in the Editor once you've modified them accordingly. Please note, the Handwear category is for hand accessories or Wearables that replace hands with other functionally similar ones, not for items that are held.",
"action": "Learn more"
},
"migrate_to_sdk7_modal": {
diff --git a/src/modules/translation/languages/es.json b/src/modules/translation/languages/es.json
index 8fcbd404b..9712d8c77 100644
--- a/src/modules/translation/languages/es.json
+++ b/src/modules/translation/languages/es.json
@@ -2342,17 +2342,6 @@
"subtitle": "Gracias por revisar esta colleción"
}
},
- "event_banner": {
- "small": {
- "title": "¡Crea para el Festival de Música Decentraland!",
- "subtitle": "Agrega la etiqueta {event_tag} a tus wearables y emotes con temática espacial y aparecerán en una pestaña especial del festival en el Marketplace."
- },
- "event_tag": "DCLMF24"
- },
- "campaign": {
- "name": "Festival de Música Decentraland",
- "tag": "DCLMF24"
- },
"logged_in_detail_page": {
"error_title": "Ocurrió un error al cargar la página de detalles"
},
diff --git a/src/modules/translation/languages/zh.json b/src/modules/translation/languages/zh.json
index b84c4bf71..31a338c37 100644
--- a/src/modules/translation/languages/zh.json
+++ b/src/modules/translation/languages/zh.json
@@ -2323,17 +2323,6 @@
"subtitle": "感谢您查看此合集"
}
},
- "event_banner": {
- "small": {
- "title": "为 Decentraland 音乐节创作!",
- "subtitle": "为您的太空主题可穿戴设备和表情添加 {event_tag} 标签,它们将在市场上的特殊节日标签中展示!"
- },
- "event_tag": "DCLMF24"
- },
- "campaign": {
- "name": "Decentraland 音乐节",
- "tag": "DCLMF24"
- },
"logged_in_detail_page": {
"error_title": "加载详细信息页面时出错"
},
diff --git a/tsconfig.node.json b/tsconfig.node.json
index 42872c59f..36750b0f1 100644
--- a/tsconfig.node.json
+++ b/tsconfig.node.json
@@ -3,8 +3,9 @@
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
+ "jsx": "react-jsx",
"moduleResolution": "bundler",
- "allowSyntheticDefaultImports": true
+ "allowSyntheticDefaultImports": true,
},
"include": ["vite.config.ts"]
}
diff --git a/vite.config.ts b/vite.config.ts
index 33d1a64ed..475f50b3d 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,14 +1,14 @@
import react from '@vitejs/plugin-react-swc'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import path from 'path'
-import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite'
+import { defineConfig, loadEnv } from 'vite'
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const envVariables = loadEnv(mode, process.cwd())
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return {
- plugins: [react(), nodePolyfills(), splitVendorChunkPlugin()],
+ plugins: [react(), nodePolyfills()],
// Required because the CatalystClient tries to access it
define: {
// eslint-disable-next-line @typescript-eslint/naming-convention
@@ -62,7 +62,7 @@ export default defineConfig(({ mode }) => {
commonjsOptions: {
transformMixedEsModules: true
},
- sourcemap: true
+ sourcemap: false
},
base: envVariables.VITE_BASE_URL
}