Skip to content

Commit

Permalink
Fix preview keychain url
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Apr 12, 2024
1 parent 02cf0e9 commit 33350c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export function StarknetProvider({ children }: PropsWithChildren) {
}

const url =
process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"
process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL === "preview"
? "https://" +
(process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL as string).replace(
"cartridge-starknet-react-next-git",
"keychain-git",
"cartridge-starknet-react-next",
"keychain",
)
: process.env.XFRAME_URL;
const connectors = [
Expand Down
14 changes: 0 additions & 14 deletions examples/starknet-react-next/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ import { DojoSpawnAndMove } from "components/DojoSpawnAndMove";
const Home: NextPage = () => {
return (
<div>
<div>
<p>VERCEL_ENV: {process.env.NEXT_PUBLIC_VERCEL_ENV}</p>
<p>VERCEL_URL: {process.env.NEXT_PUBLIC_VERCEL_URL}</p>
<p>VERCEL_BRANCH_URL: {process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}</p>
<p>
Keychain URL: https://
{process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"
? (process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL as string).replace(
"cartridge-starknet-react-next-git",
"keychain-git",
)
: process.env.XFRAME_URL}
</p>
</div>
<h2>Wallet</h2>
<ConnectWallet />
<DojoSpawnAndMove />
Expand Down

0 comments on commit 33350c4

Please sign in to comment.