Skip to content

Commit

Permalink
refactor: Get org address from config
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-elimu committed Mar 22, 2024
1 parent b3a21e1 commit ec76d9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion frontend_v2/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import Image from 'next/image'

export default function Home() {
console.log('Home')

const optimismDeployment = require('../../smart-contracts/deployments/optimism-sepolia.json')
const orgAddress = optimismDeployment.dao_contract
console.log('orgAddress:', orgAddress)

return (
<div className="flex flex-col items-center justify-center min-h-screen py-2 bg-green-200">
<Header />
Expand All @@ -15,7 +20,7 @@ export default function Home() {
Radical DAO Transparency 🐸
</h1>

<Link href="/orgs/0x43A30DB2d6962c37a702E869FbD15cFc4f86f621" className="hover:text-purple-600 focus:text-purple-600">
<Link href={`/orgs/${orgAddress}`} className="hover:text-purple-600 focus:text-purple-600">
<Image alt='Frog DAO' src={'/transparent.png'} width={400} height={400}
className='mt-8 rounded-2xl' />
</Link>
Expand Down
7 changes: 4 additions & 3 deletions frontend_v2/pages/orgs/[orgAddress].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useRouter } from "next/router";
import Header from "../../components/Header";
// import Header from '@/components/Header';
import Footer from "../../components/Footer";
import Link from "next/link";

export default function Organization() {
console.log('Organization')
Expand All @@ -21,9 +22,9 @@ export default function Organization() {
<h1 className="text-6xl font-bold">
Frog DAO
</h1>
<code className="mt-4">
0x43A30DB2d6962c37a702E869FbD15cFc4f86f621
</code>
<Link className="mt-4" href={`https://sepolia-optimism.etherscan.io/address/${orgAddress}`} target="_blank">
<code>{orgAddress}</code> ↗️
</Link>

<div id="daoRoles" className="mt-4">
<div>
Expand Down

0 comments on commit ec76d9a

Please sign in to comment.