Skip to content

Commit

Permalink
disabled button for scroll, fixed images, removed code of conduct (#482)
Browse files Browse the repository at this point in the history
* disabled button for scroll, fixed images, removed code of conduct

* forgot to add the flag
  • Loading branch information
yitongzhang authored Sep 4, 2024
1 parent 3da051b commit 423cb91
Show file tree
Hide file tree
Showing 8 changed files with 489 additions and 294 deletions.
353 changes: 178 additions & 175 deletions src/assets/tenant/cyber_hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 40 additions & 40 deletions src/assets/tenant/ens_hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
177 changes: 177 additions & 0 deletions src/assets/tenant/lyra_hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 21 additions & 17 deletions src/assets/tenant/optimism_hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 21 additions & 17 deletions src/assets/tenant/scroll_hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 21 additions & 17 deletions src/assets/tenant/uniswap_hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 30 additions & 27 deletions src/components/Delegates/DelegateCard/DelegateActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Button } from "@/components/Button";
import { ConnectKitButton } from "connectkit";
import { type SyntheticEvent } from "react";
import Tenant from "@/lib/tenant/tenant";
import { TENANT_NAMESPACES } from "@/lib/constants";

export function DelegateActions({
delegate,
Expand All @@ -28,7 +29,7 @@ export function DelegateActions({
const discord = delegate?.statement?.discord;
const warpcast = delegate?.statement?.warpcast;

const { contracts, ui } = Tenant.current();
const { contracts, ui, namespace } = Tenant.current();
const hasAlligator = contracts?.alligator;

const isRetired = ui.delegates?.retired.includes(
Expand All @@ -51,33 +52,35 @@ export function DelegateActions({
twitter={twitter}
warpcast={warpcast}
/>
<div>
{isConnected ? (
address &&
(isAdvancedUser && hasAlligator ? (
<AdvancedDelegateButton
delegate={delegate}
delegators={delegators}
/>
{namespace !== TENANT_NAMESPACES.SCROLL && (
<div>
{isConnected ? (
address &&
(isAdvancedUser && hasAlligator ? (
<AdvancedDelegateButton
delegate={delegate}
delegators={delegators}
/>
) : (
<DelegateButton full={!twitter && !discord} delegate={delegate} />
))
) : (
<DelegateButton full={!twitter && !discord} delegate={delegate} />
))
) : (
<ConnectKitButton.Custom>
{({ show }) => (
<Button
onClick={(e: SyntheticEvent) => {
e.preventDefault();
e.stopPropagation();
show?.();
}}
>
Delegate
</Button>
)}
</ConnectKitButton.Custom>
)}
</div>
<ConnectKitButton.Custom>
{({ show }) => (
<Button
onClick={(e: SyntheticEvent) => {
e.preventDefault();
e.stopPropagation();
show?.();
}}
>
Delegate
</Button>
)}
</ConnectKitButton.Custom>
)}
</div>
)}
</div>
);
}
2 changes: 1 addition & 1 deletion src/lib/tenant/configs/ui/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const scrollTenantUIConfig = new TenantUI({
},
{
name: "delegates/code-of-conduct",
enabled: true,
enabled: false,
},
{
name: "info",
Expand Down

0 comments on commit 423cb91

Please sign in to comment.