Skip to content

Commit

Permalink
bump referrrer
Browse files Browse the repository at this point in the history
  • Loading branch information
dekanbro committed Jun 13, 2024
1 parent 4358985 commit 539b04f
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 24 deletions.
7 changes: 4 additions & 3 deletions src/components/ArticleListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ export const ArticleListItem = ({
)}
<Tags>
{parsedContent?.tags?.map((tag, key) => {
const tagObj = tag as unknown as {label: string, value: string};
return (
<Tag className="article-tag" key={key} tagColor="violet">
{tag}
{tagObj.label}
</Tag>
);
})}
}) || []}
</Tags>
<ArticleLinks>
{(!parsedContent?.parentId || parsedContent?.parentId === "0") && (
Expand Down Expand Up @@ -196,7 +197,7 @@ export const ArticleListItem = ({
</StyledLink>
)}

<StyledLink to={`#`} isDead>
<StyledLink to={`#`} isdead="true">
created at: {formattedDate}
</StyledLink>
{(!parsedContent?.parentId || parsedContent?.parentId === "0") && (
Expand Down
12 changes: 6 additions & 6 deletions src/components/ButtonRouterLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ type ProfileLinkProps = {
href?: string;
to: string;
selected?: boolean;
isDead?: boolean;
isdead?: string;
disabled?: boolean;
linkType?: "internal" | "external" | "no-icon-external";
hideIcon?: boolean;
target?: string;
rel?: string;
} & Partial<ComponentProps<typeof Button>>;

const StyledRouterLink = styled(RouterLink)<{ isDead?: boolean }>`
const StyledRouterLink = styled(RouterLink)<{ isdead?: string }>`
text-decoration: none;
color: unset;
pointer-events: ${({ isDead }) => (isDead ? "none" : "auto")};
cursor: ${({ isDead }) => (isDead ? "default" : "pointer")};
pointer-events: ${({ isdead }) => (isdead == "true" ? "none" : "auto")};
cursor: ${({ isdead }) => (isdead =="true" ? "default" : "pointer")};
&:hover {
text-decoration: none;
}
Expand All @@ -33,7 +33,7 @@ export const ButtonRouterLink = ({
linkType,
hideIcon,
rel,
isDead,
isdead,
...buttonProps
}: ProfileLinkProps) => {
return (
Expand All @@ -42,7 +42,7 @@ export const ButtonRouterLink = ({
target={target}
className="button-link"
rel={rel}
isDead={isDead}
isdead={isdead?.toString()}
>
<Button size="sm" variant="link" disabled={disabled} {...buttonProps}>
{children}
Expand Down
7 changes: 5 additions & 2 deletions src/components/customFields/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ export const MultiSelect = (props: Buildable<Field>) => {
const [content, createdAt] = watch([props.id, "createdAt"]);

const options = [
{ value: "publication", label: "Publication" },
{ value: "event", label: "Event" },
{ value: "document", label: "Document" },
{ value: "event", label: "Event" },
{ value: "publication", label: "Publication" },
{ value: "proposal", label: "Proposal" },
{ value: "RFC", label: "Request For Comment" },
{ value: "special", label: "Special" },
];

Expand Down Expand Up @@ -42,6 +44,7 @@ export const MultiSelect = (props: Buildable<Field>) => {
};
});
setSelectedOption(tags || []);
setValue(props.id, tags || []);
}
}, [createdAt]);

Expand Down
2 changes: 1 addition & 1 deletion src/components/hub/DaoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const DaoCard = ({
>
Collector Dashboard
</ButtonRouterLink>
<ButtonRouterLink color="secondary" to="#" isDead>
<ButtonRouterLink color="secondary" to="#" isdead="true">
Created At: {formattedDate}
</ButtonRouterLink>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/AllComments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const AllComments = ({
>
OP detail
</StyledLink>
<StyledLink to="#" isDead>
<StyledLink to="#" isdead="true">
created at: {formatDate(Number(parsedComment.createdAt))}
</StyledLink>
</ArticleLinks>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ArticleDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const ArticleDetails = ({
<TitleWrapper>
<H1>{parsedContent?.title}</H1>
{parsedContent?.createdAt && (
<StyledLink to={``} isDead>
<StyledLink to={``} isdead="true">
Created at: {formatDate(Number(parsedContent.createdAt))}
</StyledLink>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const Comments = ({
description={`Comments (${comments.length})`}
>
<StyledLink to={`/molochv3/${daoChain}/${daoId}/${tableRoute}/${hash}`}>
<ParLg>OP detail</ParLg>
<ParLg>OP detail</ParLg>
</StyledLink>

<CardWrapper>
Expand Down Expand Up @@ -173,7 +173,7 @@ export const Comments = ({
>
details
</StyledLink>
<StyledLink to="#" isDead>
<StyledLink to="#" isdead="true">
Created At: {formatDate(Number(parsedComment.createdAt))}
</StyledLink>
</ArticleLinks>
Expand Down
20 changes: 17 additions & 3 deletions src/pages/Member.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BsArrowLeft, BsShareFill } from "react-icons/bs";
import styled from "styled-components";

import { useCurrentDao, useDaoData, useDaoMember } from "@daohaus/moloch-v3-hooks";
import { MemberProfileCard } from "@daohaus/moloch-v3-macro-ui";
import { useCurrentDao, useDaoData, useDaoMember, useProfile } from "@daohaus/moloch-v3-hooks";
import { MemberProfile, MemberProfileCard } from "@daohaus/moloch-v3-macro-ui";
import {
Button,
ParLg,
Expand Down Expand Up @@ -48,6 +48,10 @@ export const Member = () => {
const { successToast } = useToast();
const isMobile = useBreakpoint(widthQuery.sm);

const { profile: currentProfile, isLoading: isLoadingProfile } = useProfile({
address: member?.memberAddress || '',
});


const handleOnClick = () => {
navigator.clipboard.writeText(`${window.location.href}`);
Expand Down Expand Up @@ -86,13 +90,23 @@ export const Member = () => {
</Button>
</ButtonsContainer>

<MemberProfileCard
{/* <MemberProfileCard
daoChain={daoChain}
daoId={daoId}
member={member}
allowLinks={true}
allowMemberMenu={true}
/> */}
{isLoadingProfile ? <Loading size={12} /> :(
<MemberProfile
daoChain={daoChain}
dao={dao}
profile={currentProfile}
membership={member}
allowLinks={true}
allowMemberMenu={true}
/>
)}
<LocalDrafts memberAddress={member.memberAddress as EthAddress} dao={dao} daoChain={daoChain} />
<MemberNFts memberAddress={member.memberAddress as EthAddress} dao={dao} daoChain={daoChain} />

Expand Down
4 changes: 2 additions & 2 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Keychain } from "@daohaus/keychain-utils";

export const NFT_DAO_REFERRER = "DHNFTCuratorShamanSummonerV0.3";
export const NFT_DAO_REFERRER = "DHNFTCuratorShamanSummonerV0.4";
// NFT shaman name NFTCuratorShamanV0.2

// export const DEFAULT_NETWORK_ID = "0xaa36a7";
Expand All @@ -20,4 +20,4 @@ export const TCR_GRAPH_URL: Keychain = {
"0xaa36a7": "https://api.thegraph.com/subgraphs/name/hausdao/dh-signal-tcr-sepolia",
};

export const DEFAULT_GRAPH_URL = "https://api.thegraph.com/subgraphs/name/daohaus/sepolia";
export const DEFAULT_GRAPH_URL = `https://gateway-arbitrum.network.thegraph.com/api/${process.env["NX_GRAPH_API_KEY_MAINNET"]}/subgraphs/id/CgH5vtz9CJPdcSmD3XEh8fCVDjQjnRwrSawg71T1ySXW`;
6 changes: 3 additions & 3 deletions src/utils/listStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export const ButtonList = styled.div`
margin-bottom: 1rem;
`;

export const StyledLink = styled(Link)<{ isDead?: boolean }>`
export const StyledLink = styled(Link)<{ isdead?: string }>`
text-decoration: none;
color: ${({ theme }) => theme.primary.step10};
pointer-events: ${({ isDead }) => (isDead ? "none" : "auto")};
cursor: ${({ isDead }) => (isDead ? "default" : "pointer")};
pointer-events: ${({ isdead }) => (isdead == "true" ? "none" : "auto")};
cursor: ${({ isdead }) => (isdead == "true" ? "default" : "pointer")};
&:hover {
text-decoration: none;
font-weight: bold;
Expand Down

0 comments on commit 539b04f

Please sign in to comment.