Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This reverts commit d5ef9b07228259cf559c263f024ed8ef201e1968. #1264

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22,504 changes: 16,916 additions & 5,588 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,14 @@
"@snapshot-labs/snapshot.js": "0.5.5",
"@tanstack/react-query": "^4.29.7",
"autoprefixer": "^10.4.4",
"chalk": "^4.1.2",
"chart.js": "^3.8.2",
"classnames": "^2.3.2",
"clipboard-copy": "^4.0.1",
"core-js": "^3.21.1",
"cssnano": "^6.0.1",
"dayjs-precise-range": "^1.0.1",
"dcl-catalyst-client": "^21.5.0",
"decentraland-gatsby": "^5.86.2",
"decentraland-gatsby": "^5.75.1",
"decentraland-ui": "^4.1.0",
"discord.js": "^14.7.1",
"dompurify": "^2.3.3",
Expand All @@ -85,7 +84,6 @@
"gatsby-plugin-typescript": "^4.10.0",
"gatsby-source-filesystem": "^4.10.0",
"gatsby-transformer-sharp": "^4.10.0",
"isomorphic-fetch": "^3.0.0",
"keccak": "^3.0.1",
"lodash": "^4.17.21",
"nft.storage": "^7.1.1",
Expand Down
11 changes: 3 additions & 8 deletions src/components/Layout/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import React from 'react'

import { useLocation } from '@reach/router'
import UserInformation, { UserInformationProps } from 'decentraland-gatsby/dist/components/User/UserInformation'
import UserMenu from 'decentraland-gatsby/dist/components/User/UserMenu'
import useFeatureFlagContext from 'decentraland-gatsby/dist/context/FeatureFlag/useFeatureFlagContext'
import UserMenu, { UserMenuProps } from 'decentraland-gatsby/dist/components/User/UserMenu'
import { Mobile, NotMobile } from 'decentraland-ui/dist/components/Media/Media'

import { FeatureFlags } from '../../utils/features'

import BurgerMenu from './BurgerMenu/BurgerMenu'

const BURGER_MENU_LOCATIONS = ['/', '/proposals/', '/transparency/', '/projects/', '/profile/']

function Navbar(props: UserInformationProps) {
function Navbar(props: UserMenuProps) {
const location = useLocation()
const showBurgerMenu = BURGER_MENU_LOCATIONS.some((burgerLocation) => burgerLocation === location.pathname)

const [ff] = useFeatureFlagContext()
return (
<>
{showBurgerMenu && (
Expand All @@ -25,7 +20,7 @@ function Navbar(props: UserInformationProps) {
</Mobile>
)}
<NotMobile>
{ff.flags[FeatureFlags.NewNavbarDropdown] ? <UserInformation {...props} /> : <UserMenu {...props} />}
<UserMenu {...props} />
</NotMobile>
</>
)
Expand Down
6 changes: 0 additions & 6 deletions src/components/Layout/Navigation.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
vertical-align: middle;
}

.dcl.navbar-account .ui.button.inverted {
color: white;
background-color: var(--primary);
border: none;
}

@media (min-width: 768px) {
.Navigation .dcl.tabs {
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions src/entities/Committee/isDAOCommittee.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import chalk from 'chalk'
import { yellow } from 'colors/safe'
import env from 'decentraland-gatsby/dist/utils/env'
import isEthereumAddress from 'validator/lib/isEthereumAddress'

Expand All @@ -9,7 +9,7 @@ export const COMMITTEE_ADDRESSES = (env('COMMITTEE_ADDRESSES', '') || '')

const committeeAddresses = new Set(COMMITTEE_ADDRESSES)

committeeAddresses.forEach((address) => console.log('committee address:', chalk.yellow(address)))
committeeAddresses.forEach((address) => console.log('committee address:', yellow(address)))

export default function isDAOCommittee(user?: string | null | undefined) {
if (!user) {
Expand Down
4 changes: 2 additions & 2 deletions src/entities/Debug/isDebugAddress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import chalk from 'chalk'
import { magenta } from 'colors/safe'
import env from 'decentraland-gatsby/dist/utils/env'
import isEthereumAddress from 'validator/lib/isEthereumAddress'

Expand All @@ -9,7 +9,7 @@ export const DEBUG_ADDRESSES = (env('DEBUG_ADDRESSES', '') || '')

const debugAddresses = new Set(DEBUG_ADDRESSES)

debugAddresses.forEach((address) => console.log('debug address:', chalk.magenta(address)))
debugAddresses.forEach((address) => console.log('debug address:', magenta(address)))

export default function isDebugAddress(address: string | undefined) {
return address && address.length > 0 && debugAddresses.has(address.toLowerCase())
Expand Down
1 change: 0 additions & 1 deletion src/utils/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ export enum FeatureFlags {
// Polygon = 'dao-enabled-polygon',
Ens = 'dao-enabled-ens',
Delegation = 'dao-enabled-delegation',
NewNavbarDropdown = 'dapps-new-navbar-dropdown',
}