Skip to content

Commit

Permalink
Merge branch 'master' of github.com:decentraland/builder into fix/rem…
Browse files Browse the repository at this point in the history
…ove-feature-flags
  • Loading branch information
LautaroPetaccio committed Jan 19, 2024
2 parents 9a28068 + 78d15a3 commit 4985445
Show file tree
Hide file tree
Showing 32 changed files with 78 additions and 235 deletions.
100 changes: 50 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
"dcl-catalyst-client": "^21.5.5",
"dcl-scene-writer": "^1.1.2",
"decentraland": "^3.3.0",
"decentraland-ui": "^5.2.0",
"decentraland-builder-scripts": "^0.24.0",
"decentraland-crypto-fetch": "^2.0.1",
"decentraland-dapps": "^16.34.2",
"decentraland-dapps": "^17.0.0",
"decentraland-ecs": "^6.6.1-20201020183014.commit-bdc29ef-hotfix",
"decentraland-experiments": "^1.0.2",
"decentraland-transactions": "^1.47.0",
"decentraland-ui": "^4.35.3",
"ethers": "^5.6.8",
"file-saver": "^2.0.1",
"graphql": "^15.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/ActivityPage/ActivityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ActivityPage = (props: Props) => {

return (
<>
<Navbar isFullscreen />
<Navbar />
<Navigation />
<Page className="ActivityPage">{content}</Page>
<Modal size="tiny" open={showConfirmation}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ErrorPage/ErrorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class ErrorPage extends React.PureComponent<Props> {
const { stackTrace } = this.props
return (
<>
<Navbar isFullscreen />
<Navbar />
<Page isFullscreen>
<div className="ErrorPage">
<h1 className="title">{t('error_page.title')}</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/components/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const HomePage: React.FC<Props> = props => {

return (
<>
<Navbar isFullscreen />
<Navbar />
<Page isFullscreen className="HomePage">
<Navigation activeTab={NavigationTab.OVERVIEW}>
<SyncToast />
Expand Down
2 changes: 1 addition & 1 deletion src/components/LandProviderPage/LandProviderPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class LandProviderPage extends React.PureComponent<Props> {
}
return (
<>
<Navbar isFullscreen />
<Navbar />
<Page className={classes.join(' ')}>
<LandProvider>
{(id, land, isLoading, { deployments, rental }) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoadingPage/LoadingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class LoadingPage extends React.PureComponent {
return (
<>
{/* <Ad slot="BUILDER_TOP_BANNER" type="full" /> */}
<Navbar isFullscreen />
<Navbar />
<Page isFullscreen>
<Loader active size="huge" />
</Page>
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoggedInDetailPage/LoggedInDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class LoggedInDetailPage extends React.PureComponent<Props> {

return (
<>
<Navbar isFullscreen />
<Navbar />
{hasNavigation ? <Navigation activeTab={activeTab} isFullscreen={isNavigationFullscreen} /> : null}
<Page className={classNames('LoggedInDetailPage', className)} isFullscreen={isPageFullscreen}>
{isLoading ? this.renderLoading() : null}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MobilePage/MobilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default class MobilePage extends React.PureComponent<Props, State> {
render() {
return (
<>
<Navbar isFullscreen isOverlay />
<Navbar />
<Page isFullscreen className="MobilePage">
<Container>
<div className="slot-image" />
Expand Down
7 changes: 3 additions & 4 deletions src/components/Navbar/Navbar.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ import { push } from 'connected-react-router'
import { isPending } from 'decentraland-dapps/dist/modules/transaction/utils'
import { isLoggedIn } from 'modules/identity/selectors'
import { RootState } from 'modules/common/types'
import { getIsNavbarV2Enabled, getIsNewNavbarDropdownEnabled } from 'modules/features/selectors'
import { getIsNewNavbarDropdownEnabled } from 'modules/features/selectors'
import { getTransactions } from 'modules/transaction/selectors'
import { locations } from 'routing/locations'
import { MapStateProps, MapDispatchProps, MapDispatch, OwnProps } from './Navbar.types'
import Navbar from './Navbar'

const mapState = (state: RootState): MapStateProps => ({
hasPendingTransactions: getTransactions(state).some(tx => isPending(tx.status)),
isConnected: isLoggedIn(state),
isNewNavbarEnabled: getIsNewNavbarDropdownEnabled(state),
isNavbarV2Enabled: getIsNavbarV2Enabled(state)
isSignedIn: isLoggedIn(state),
isNewNavbarEnabled: getIsNewNavbarDropdownEnabled(state)
})

const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/Navbar.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.dui-navbar2 > .dui-submenu-container:not(.unselected) > .item.submenu {
.dui-navbar > .dui-submenu-container:not(.unselected) > .item.submenu {
width: 100%;
}
14 changes: 4 additions & 10 deletions src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import React from 'react'
import { Navbar2 as BaseNavbar2 } from 'decentraland-dapps/dist/containers'
import { Navbar as BaseNavbar } from 'decentraland-dapps/dist/containers'
import { Navbar2Pages } from 'decentraland-ui/dist/components/Navbar2/Navbar2.types'
import UserInformation from 'components/UserInformation'
import { Navbar as BaseNavbar } from 'decentraland-dapps/dist/containers/'
import { NavbarPages } from 'decentraland-ui/dist/components/Navbar/Navbar.types'
import { Props } from './Navbar.types'

import './Navbar.css'

const Navbar: React.FC<Props> = ({ hasPendingTransactions, isNavbarV2Enabled, ...props }: Props) => {
return isNavbarV2Enabled ? (
<BaseNavbar2 activePage={Navbar2Pages.CREATE} {...props} hasActivity={hasPendingTransactions} />
) : (
<BaseNavbar activePage="builder" {...props} rightMenu={<UserInformation />} />
)
const Navbar: React.FC<Props> = ({ hasPendingTransactions, ...props }: Props) => {
return <BaseNavbar activePage={NavbarPages.CREATE} {...props} hasActivity={hasPendingTransactions} />
}

export default React.memo(Navbar)
6 changes: 3 additions & 3 deletions src/components/Navbar/Navbar.types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { NavbarProps } from 'decentraland-ui'
import { NavbarProps } from 'decentraland-dapps/dist/containers/Navbar/Navbar.types'
import { Dispatch } from 'redux'

export type Props = Partial<NavbarProps> & { isNewNavbarEnabled: boolean; isNavbarV2Enabled: boolean; hasPendingTransactions: boolean }
export type Props = Partial<NavbarProps> & { isNewNavbarEnabled: boolean; hasPendingTransactions: boolean }

export type MapStateProps = Pick<Props, 'hasPendingTransactions' | 'isConnected' | 'isNewNavbarEnabled' | 'isNavbarV2Enabled'>
export type MapStateProps = Pick<Props, 'hasPendingTransactions' | 'isSignedIn' | 'isNewNavbarEnabled'>
export type MapDispatchProps = Pick<Props, 'onSignIn'>
export type MapDispatch = Dispatch
export type OwnProps = Partial<Props>
2 changes: 1 addition & 1 deletion src/components/NotFoundPage/NotFoundPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function NotFoundPage(props: Props) {

return (
<div className="notfound-body">
<Navbar isFullscreen />
<Navbar />
<Page isFullscreen />
<div className="NotFoundPage">
<h1 className="title">{t('not_found_page.title')}</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SceneDetailPage/SceneDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const SceneDetailPage: React.FC<Props> = props => {

return (
<>
<Navbar isFullscreen />
<Navbar />
<Page className="SceneDetailPage" isFullscreen>
{isLoading && !project ? renderLoading() : null}
{!isLoading && !project ? renderNotFound() : null}
Expand Down
2 changes: 1 addition & 1 deletion src/components/SceneListPage/SceneListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class SceneListPage extends React.PureComponent<Props> {

return (
<>
<Navbar isFullscreen />
<Navbar />
<Page isFullscreen>
<div className="SceneListPage">
<Container>
Expand Down

0 comments on commit 4985445

Please sign in to comment.