Skip to content

Commit

Permalink
add Herocast deeplinks (desktop)
Browse files Browse the repository at this point in the history
  • Loading branch information
artlu99 committed Jul 3, 2024
1 parent 1e02c55 commit 0d0f05c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/apps/cast/AltClientLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { degencastLink, farquestLink, recasterLink, supercastLink, warpcastLink } from '@app/constants/altClients';
import { degencastLink, farquestLink, herocastLink, recasterLink, supercastLink, warpcastLink } from '@app/constants/altClients';
import { useResponsive } from '@app/hooks/useResponsive';
import { Link } from 'react-router-dom';
import * as S from './Cast.styles';
Expand All @@ -11,6 +11,7 @@ export const AltClientLinks: React.FC<AltClientLinksProps> = ({ castHash, castFi
const { mobileOnly } = useResponsive();
const maybeFarquestLink = farquestLink({ fid: castFid, hash: castHash });
const maybeRecasterLink = mobileOnly ? recasterLink({ hash: castHash }) : undefined;
const maybeHerocastLink = mobileOnly ? undefined : herocastLink({ hash: castHash });

return (
<S.Description>
Expand All @@ -35,6 +36,12 @@ export const AltClientLinks: React.FC<AltClientLinksProps> = ({ castHash, castFi
<Link to={degencastLink({ hash: castHash })} target="_blank">
[Degencast]
</Link>
{maybeHerocastLink && (
<Link to={maybeHerocastLink} target="_blank">
{' '}
[Herocast]
</Link>
)}
</S.Description>
);
};
5 changes: 5 additions & 0 deletions src/constants/altClients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ export const degencastLink = (props: LinkProps) => {
const { hash } = props;
return `https://degencast.xyz/casts/${hash.slice(2)}`;
};

export const herocastLink = (props: LinkProps) => {
const { hash } = props;
return `https://app.herocast.xyz/conversation/${hash}`;
};

0 comments on commit 0d0f05c

Please sign in to comment.