Skip to content

Commit

Permalink
feat: add mint url
Browse files Browse the repository at this point in the history
  • Loading branch information
bigint committed Feb 25, 2024
1 parent 1eb805d commit 409371b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions apps/web/src/components/Shared/Oembed/Portal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ const Portal: FC<PortalProps> = ({ portal, publicationId }) => {
className="justify-center"
disabled={loading || !publicationId || !currentProfile}
icon={
(action === 'link' || action === 'post_redirect') && (
<LinkIcon className="size-4" />
)
(action === 'link' ||
action === 'post_redirect' ||
action === 'mint') && <LinkIcon className="size-4" />
}
key={index}
onClick={() => {
Expand All @@ -93,8 +93,13 @@ const Portal: FC<PortalProps> = ({ portal, publicationId }) => {
publication_id: publicationId
});

if (action === 'link' || action === 'post_redirect') {
window.open(target || portalUrl, '_blank');
if (
action === 'link' ||
action === 'post_redirect' ||
action === 'mint'
) {
const url = action === 'mint' ? portalUrl : target || portalUrl;
window.open(url, '_blank');
} else if (action === 'post') {
onPost(index);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/types/misc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface Nft {
sourceUrl: string;
}

export type ButtonType = 'link' | 'post_redirect' | 'post';
export type ButtonType = 'link' | 'mint' | 'post_redirect' | 'post';

export interface Portal {
buttons: {
Expand Down

1 comment on commit 409371b

@vercel
Copy link

@vercel vercel bot commented on 409371b Feb 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web – ./apps/web

web-git-main-heyxyz.vercel.app
web-heyxyz.vercel.app
heyxyz.vercel.app
hey.xyz

Please sign in to comment.