Skip to content

Commit

Permalink
fix: use pinata gateway for general links
Browse files Browse the repository at this point in the history
  • Loading branch information
aramalipoor committed Nov 10, 2022
1 parent 0a48cc6 commit 8ddf3a8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ipfs/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const normalizeIpfsUrl = (
/^ipfs:\/\//i,
preferManagedGateway
? 'https://ipfs.flair.finance/ipfs/'
: 'https://ipfs.io/ipfs/',
: 'https://gateway.pinata.cloud/ipfs/',
);
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ export type ButtonWithDialogProps<T extends HTMLElement = HTMLButtonElement> =
dialogCloseWrapperClassName?: string;
dialogCloseButtonClassName?: string;
portalClassName?: string;
buttons?: ((
dialogOpen: boolean,
setDialogOpen: (open: boolean) => void,
) => React.ReactNode)[];
}
>;

export function ButtonWithDialog<T extends HTMLElement = HTMLElement>({
as,
text,
buttons,
children,
dialogTitle,
dialogTitleClassName,
Expand Down Expand Up @@ -85,6 +90,15 @@ export function ButtonWithDialog<T extends HTMLElement = HTMLElement>({
</h3>
)}
{children}
{buttons?.length ? (
<div className="bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6">
{buttons.map((button, index) => (
<Fragment key={index}>
{button(dialogOpen, setDialogOpen)}
</Fragment>
))}
</div>
) : null}
</Modal>
</>
);
Expand Down

0 comments on commit 8ddf3a8

Please sign in to comment.