diff --git a/.env.tpl b/.env.tpl index b00872b..44da683 100644 --- a/.env.tpl +++ b/.env.tpl @@ -3,6 +3,7 @@ NEXT_PUBLIC_W3UP_SERVICE_URL=https://staging.up.web3.storage NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://staging.up.web3.storage/receipt/ NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:staging.web3.storage NEXT_PUBLIC_W3UP_PROVIDER=did:web:staging.web3.storage +NEXT_PUBLIC_IPFS_GATEWAY_URL=https://%ROOT_CID%.ipfs-staging.w3s.link # set these to your gateway service URL and DID NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://freeway-staging.dag.haus diff --git a/.github/workflows/deploy-storacha.yml b/.github/workflows/deploy-storacha.yml index b816a2d..cefa398 100644 --- a/.github/workflows/deploy-storacha.yml +++ b/.github/workflows/deploy-storacha.yml @@ -42,6 +42,7 @@ jobs: echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:staging.web3.storage" >> .env echo "NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://freeway-staging.dag.haus" >> .env echo "NEXT_PUBLIC_W3UP_GATEWAY_ID=did:web:staging.w3s.link" >> .env + echo "NEXT_PUBLIC_IPFS_GATEWAY_URL=https://%ROOT_CID%.ipfs-staging.w3s.link" >> .env echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1NzhdvF6A5ufQX5vKNZuRhie" >> .env echo "NEXT_PUBLIC_STRIPE_TRIAL_PRICING_TABLE_ID=prctbl_1QIDHGF6A5ufQX5vOK9Xl8Up" >> .env echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51LO87hF6A5ufQX5viNsPTbuErzfavdrEFoBuaJJPfoIhzQXdOUdefwL70YewaXA32ZrSRbK4U4fqebC7SVtyeNcz00qmgNgueC" >> .env @@ -139,6 +140,7 @@ jobs: echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:web3.storage" >> .env echo "NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://w3s.link" >> .env echo "NEXT_PUBLIC_W3UP_GATEWAY_ID=did:web:w3s.link" >> .env + echo "NEXT_PUBLIC_IPFS_GATEWAY_URL=https://%ROOT_CID%.ipfs.w3s.link" >> .env echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1OCJ1qF6A5ufQX5vM5DWg4rA" >> .env echo "NEXT_PUBLIC_STRIPE_TRIAL_PRICING_TABLE_ID=prctbl_1QPYsuF6A5ufQX5vdIGAe54g" >> .env echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_51LO87hF6A5ufQX5vQTO5BHyz8y9ybJp4kg1GsBjYuqwluuwtQTkbeZzkoQweFQDlv7JaGjuIdUWAyuwXp3tmCfsM005lJK9aS8" >> .env diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fab0334..8666389 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -42,6 +42,7 @@ jobs: echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:staging.web3.storage" >> .env echo "NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://freeway-staging.dag.haus" >> .env echo "NEXT_PUBLIC_W3UP_GATEWAY_ID=did:web:staging.w3s.link" >> .env + echo "NEXT_PUBLIC_IPFS_GATEWAY_URL=https://%ROOT_CID%.ipfs-staging.w3s.link" >> .env echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1NzhdvF6A5ufQX5vKNZuRhie" >> .env echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51LO87hF6A5ufQX5viNsPTbuErzfavdrEFoBuaJJPfoIhzQXdOUdefwL70YewaXA32ZrSRbK4U4fqebC7SVtyeNcz00qmgNgueC" >> .env echo "NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL_LINK=https://billing.stripe.com/p/login/test_6oE29Gff99KO6mk8ww" >> .env @@ -132,6 +133,7 @@ jobs: echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:web3.storage" >> .env echo "NEXT_PUBLIC_W3UP_GATEWAY_HOST=https://w3s.link" >> .env echo "NEXT_PUBLIC_W3UP_GATEWAY_ID=did:web:w3s.link" >> .env + echo "NEXT_PUBLIC_IPFS_GATEWAY_URL=https://%ROOT_CID%.ipfs.w3s.link" >> .env echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1OCJ1qF6A5ufQX5vM5DWg4rA" >> .env echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_51LO87hF6A5ufQX5vQTO5BHyz8y9ybJp4kg1GsBjYuqwluuwtQTkbeZzkoQweFQDlv7JaGjuIdUWAyuwXp3tmCfsM005lJK9aS8" >> .env echo "NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL_LINK=https://billing.stripe.com/p/login/cN22aA62U6bO1sA9AA" >> .env diff --git a/src/app/space/[did]/root/[cid]/page.tsx b/src/app/space/[did]/root/[cid]/page.tsx index 2230121..0fa17dc 100644 --- a/src/app/space/[did]/root/[cid]/page.tsx +++ b/src/app/space/[did]/root/[cid]/page.tsx @@ -13,6 +13,7 @@ import CopyIcon from '@/components/CopyIcon' import { Breadcrumbs } from '@/components/Breadcrumbs' import { useRouter } from 'next/navigation' import { createUploadsListKey } from '@/cache' +import { ipfsGatewayURL } from '@/components/services' interface PageProps { params: { @@ -58,7 +59,7 @@ export default function ItemPage ({ params }: PageProps): JSX.Element { router.replace(`/space/${spaceDID}`) } - const url = `https://${root}.ipfs.w3s.link` + const url = ipfsGatewayURL(root) return (