diff --git a/package.json b/package.json index 88b3f473d..494e613cf 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,10 @@ "flatten": "yarn workspace @se-2/hardhat flatten", "hardhat:lint": "yarn workspace @se-2/hardhat lint", "hardhat:lint-staged": "yarn workspace @se-2/hardhat lint-staged", + "hardhat:format": "yarn workspace @se-2/hardhat format", "hardhat:test": "yarn workspace @se-2/hardhat test", "test": "yarn hardhat:test", + "format": "yarn next:format && yarn hardhat:format", "start": "yarn workspace @se-2/nextjs dev", "next:lint": "yarn workspace @se-2/nextjs lint", "next:format": "yarn workspace @se-2/nextjs format", diff --git a/packages/hardhat/package.json b/packages/hardhat/package.json index e7fe72c37..0b619c59c 100644 --- a/packages/hardhat/package.json +++ b/packages/hardhat/package.json @@ -11,6 +11,7 @@ "flatten": "hardhat flatten", "lint": "eslint --config ./.eslintrc.json --ignore-path ./.eslintignore ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts", "lint-staged": "eslint --config ./.eslintrc.json --ignore-path ./.eslintignore", + "format": "prettier --write ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts", "test": "REPORT_GAS=true hardhat test --network hardhat", "verify": "hardhat etherscan-verify", "hardhat-verify": "hardhat verify" diff --git a/packages/nextjs/app/layout.tsx b/packages/nextjs/app/layout.tsx index c0efb0cbe..4e02a1456 100644 --- a/packages/nextjs/app/layout.tsx +++ b/packages/nextjs/app/layout.tsx @@ -4,9 +4,9 @@ import { ScaffoldEthAppWithProviders } from "~~/components/ScaffoldEthAppWithPro import { ThemeProvider } from "~~/components/ThemeProvider"; import "~~/styles/globals.css"; -const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL - ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` - : `http://localhost:${process.env.PORT}`; +const baseUrl = process.env.VERCEL_URL + ? `https://${process.env.VERCEL_URL}` + : `http://localhost:${process.env.PORT || 3000}`; const imageUrl = `${baseUrl}/thumbnail.jpg`; export const metadata: Metadata = { diff --git a/packages/nextjs/utils/scaffold-eth/getMetadata.ts b/packages/nextjs/utils/scaffold-eth/getMetadata.ts index 533784d01..918700178 100644 --- a/packages/nextjs/utils/scaffold-eth/getMetadata.ts +++ b/packages/nextjs/utils/scaffold-eth/getMetadata.ts @@ -9,9 +9,9 @@ export const getMetadata = ({ description: string; imageRelativePath?: string; }): Metadata => { - const baseUrl = process.env.NEXT_PUBLIC_VERCEL_URL - ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}` - : `http://localhost:${process.env.PORT}`; + const baseUrl = process.env.VERCEL_URL + ? `https://${process.env.VERCEL_URL}` + : `http://localhost:${process.env.PORT || 3000}`; const imageUrl = `${baseUrl}${imageRelativePath}`; return { title: title,