Skip to content

Commit

Permalink
add env
Browse files Browse the repository at this point in the history
  • Loading branch information
SebGazeau committed Jul 22, 2024
1 parent 52004ac commit 44e7721
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
8 changes: 6 additions & 2 deletions app/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@ import {
WalletProvider,
} from "@solana/wallet-adapter-react";
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui";
import { WalletAdapterNetwork } from "@solana/wallet-adapter-base";
import {
PhantomWalletAdapter,
} from "@solana/wallet-adapter-wallets";
import { useMemo } from "react";
import { AppProvider } from "../context/context";
import "../styles/globals.css";
import { clusterApiUrl } from "@solana/web3.js";

require("@solana/wallet-adapter-react-ui/styles.css");

import { useRouter } from 'next/router';
import Header from "../components/Header";
import style from "../styles/Home.module.css";
function MyApp({ Component, pageProps }) {
// const endpoint = clusterApiUrl(WalletAdapterNetwork.Devnet);

const endpoint = process.env.NEXT_PUBLIC_TEST_NETWORK === 'true' ? "http://127.0.0.1:8899" : clusterApiUrl(WalletAdapterNetwork.Devnet);
const router = useRouter();
const endpoint = "http://127.0.0.1:8899";

// const endpoint = "http://127.0.0.1:8899";

const wallets = useMemo(
() => [
Expand Down
7 changes: 6 additions & 1 deletion app/styles/Proposal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@
color: #333;
}
.error, .success {
color: red;
margin-bottom: 0.5em;
display: inline-block;
}
.error {
color: red;
}
.succes {
color: green;
}
.listChoices {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
Expand Down
2 changes: 1 addition & 1 deletion app/utils/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PublicKey } from "@solana/web3.js";

export const PROGRAM_ID = new PublicKey(
"4AEtDMG3A5rFTFwj6KyA6K41dxxpagemC4CaG5w9oABc"//"8KcDj4FdPm6Dq6KoLFCAgPrAYEMbXtE9Ruc7B62UGeyJ"
process.env.NEXT_PUBLIC_PROGRAM_ADDRESS
);

0 comments on commit 44e7721

Please sign in to comment.