Skip to content

Commit

Permalink
allow admins to select any network for created tokens (#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinnnnn authored Apr 9, 2024
1 parent 5c5d008 commit 45bee60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,16 @@ export default function SidebarChainDropdown({
>
<DropdownSection>
{availableChains.map((chain) => {
const isChainDisabled = selectedView === 'Created' && !chain.hasCreatorSupport;
const isChainEnabled =
isAdmin || (selectedView === 'Created' && chain.hasCreatorSupport);
return (
<DropdownItem
key={chain.name}
onClick={() => {
if (isChainDisabled) return;
if (!isChainEnabled) return;
handleSelectChain(chain);
}}
disabled={isChainDisabled}
disabled={!isChainEnabled}
name="Sidebar Chain"
eventContext={contexts.Editor}
eventSelection={chain.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,16 @@ export function NftSelectorFilterNetwork({
<Dropdown position="right" active={isDropdownOpen} onClose={() => setIsDropdownOpen(false)}>
<DropdownSection>
{availableChains.map((chain) => {
const isChainDisabled = selectedMode === 'Created' && !chain.hasCreatorSupport;
const isChainEnabled =
isAdmin || (selectedMode === 'Created' && chain.hasCreatorSupport);
return (
<DropdownItem
key={chain.name}
onClick={() => {
if (isChainDisabled) return;
if (!isChainEnabled) return;
onSelectChain(chain);
}}
disabled={isChainDisabled}
disabled={!isChainEnabled}
name="NFT Selector Filter Network"
eventContext={contexts.Posts}
eventSelection={chain.name}
Expand Down

0 comments on commit 45bee60

Please sign in to comment.