Skip to content

Commit

Permalink
feat: use nft image from s3 bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
RobChangCA committed Sep 25, 2024
1 parent dd54cfd commit 26a9f42
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
14 changes: 12 additions & 2 deletions examples/ui-demo/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
await import("./env.mjs");

/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'static.alchemyapi.io',
port: '',
pathname: '/assets/accountkit/**',
},
],
}
};

export default nextConfig;
13 changes: 3 additions & 10 deletions examples/ui-demo/src/components/shared/MintCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type mintStatus = {

export const MintCard = () => {
const [status, setStatus] = useState<mintStatus>(initialState);
// To be wired into the toast pr
const [hasError, setHasError] = useState(false);
const [hasCollected, setHasCollected] = useState(false);
const handleSuccess = () => {
Expand All @@ -42,19 +43,11 @@ export const MintCard = () => {
setStatus(initialState);
setHasError(true);
};
const {
sendUserOperationResult,
// isSendingUserOperation,
sendUserOperation,
} = useSendUserOperation({
const { sendUserOperationResult, sendUserOperation } = useSendUserOperation({
client,
waitForTxn: true,
onError: handleError,
onSuccess: handleSuccess,
onSettled: () => {},
onMutate: () => {
console.log("mutation - start loading state");
},
});

const getPrimaryColorRGBA = useCallback(() => {
Expand Down Expand Up @@ -142,7 +135,7 @@ export const MintCard = () => {
<Image
width="277"
height="255"
src="/images/NFT.png"
src="https://static.alchemyapi.io/assets/accountkit/accountkit.jpg"
alt="An NFT"
className="mb-4"
/>
Expand Down

0 comments on commit 26a9f42

Please sign in to comment.