Skip to content

Commit

Permalink
Update tweet message and use direct link to tweet
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnyhaase committed Oct 21, 2023
1 parent 891cce3 commit 6b8178e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 32 deletions.
2 changes: 1 addition & 1 deletion packages/app/src/common/container/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import clx from "classnames";

interface CardProps {
className?: string;
title?: string;
title?: string | ReactNode;
image?: ReactNode;
orientation?: "horizontal" | "vertical";
size?: "small" | "medium" | "large";
Expand Down
21 changes: 0 additions & 21 deletions packages/app/src/referral/ReferTweetButton.tsx

This file was deleted.

34 changes: 24 additions & 10 deletions packages/app/src/referral/ReferralOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useCopyToClipboard } from "usehooks-ts";

import { Card } from "../common/container/Card";
import { QRCodeCard } from "./QRCodeCard";
import { ReferTweetButton } from "./ReferTweetButton";
import { FaTwitter } from "react-icons/fa";

export const ReferralOptions: FC<{ link: string }> = ({ link }) => {
const [, copy] = useCopyToClipboard();
Expand Down Expand Up @@ -36,15 +36,29 @@ export const ReferralOptions: FC<{ link: string }> = ({ link }) => {
}
></Card>
</button>
<Card
size="medium"
title={"Share"}
image={
<ReferTweetButton link={link}>
<img src="/sowing.png" alt="Share link" />
</ReferTweetButton>
}
></Card>
<a
href={`https://twitter.com/share?text=Join my forest on @SunriseStake!%0A%0AJoin me and the Solana community in making a collective positive environmental impact:%0A${link}`}
target="_blank"
rel="noreferrer"
referrerPolicy="origin"
>
<Card
size="medium"
title={
<>
<FaTwitter size={20} title="Twitter" />
Share
</>
}
image={
<img
src="/sowing.png"
className="w-full h-full object-contain"
alt="Copy"
/>
}
/>
</a>
<QRCodeCard link={link} type="sunrise" />
<QRCodeCard link={link} type="solanapay" />
</div>
Expand Down

0 comments on commit 6b8178e

Please sign in to comment.