forked from solana-labs/governance-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
realms + realm switch (solana-labs#34)
* added realms page * code fix * fix search * realm switch * realm info clear on realms page + solana logo and favicon * loader * dao info fix and solona logo always in main nav * realms logo fixes * null in realm info fix * main logo path fix * fix: add SOCEAN img * realm logo and go back to organizations nav * fix wallet disconnection on realms page * realms with env paramenter * adding endpoint options to dao * dao and realms env for app * manual merge realms-page branch Co-authored-by: Adrian Brzeziński <[email protected]> Co-authored-by: Sebastian.Bor <[email protected]>
- Loading branch information
1 parent
de675d5
commit 6840518
Showing
26 changed files
with
397 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Without comment application will run in context of one dao | ||
#DAO=MNGO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React from 'react' | ||
import useRealm from '../hooks/useRealm' | ||
import { GlobeAltIcon } from '@heroicons/react/outline' | ||
import { ArrowLeftIcon } from '@heroicons/react/solid' | ||
import Link from 'next/link' | ||
import { TwitterIcon } from '../components/icons' | ||
|
||
const OrganzationsBackNav = () => { | ||
const { realm, realmInfo } = useRealm() | ||
const { DAO } = process.env | ||
const realmName = realmInfo?.mainnetName ?? realm?.info?.name | ||
return ( | ||
<div className="pb-4"> | ||
{!DAO ? ( | ||
<Link href={`/realms`}> | ||
<a className="default-transition flex items-center mb-6 text-fgd-3 text-sm transition-all hover:text-fgd-1"> | ||
<ArrowLeftIcon className="h-4 w-4 mr-1 text-primary-light" /> | ||
Back | ||
</a> | ||
</Link> | ||
) : null} | ||
<div className="border-b border-bkg-4 flex items-center justify-between pb-4"> | ||
{realmName && ( | ||
<div className="flex items-center"> | ||
{realmInfo?.ogImage ? ( | ||
<div className="bg-[rgba(255,255,255,0.1)] rounded-full h-14 w-14 flex items-center justify-center"> | ||
<img className="w-8" src={realmInfo?.ogImage}></img> | ||
</div> | ||
) : ( | ||
<div className="bg-[rgba(255,255,255,0.1)] h-14 w-14 flex font-bold items-center justify-center rounded-full text-fgd-3"> | ||
{realmName?.charAt(0)} | ||
</div> | ||
)} | ||
<h1 className="ml-3">{realmName}</h1> | ||
</div> | ||
)} | ||
<div className="flex items-center space-x-6"> | ||
{realmInfo?.website ? ( | ||
<a | ||
className="default-transition flex items-center text-fgd-2 text-sm hover:text-fgd-1" | ||
href={realmInfo?.website} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<GlobeAltIcon className="mr-1.5 h-4 w-4" /> | ||
Website | ||
</a> | ||
) : null} | ||
{realmInfo?.twitter ? ( | ||
<a | ||
className="default-transition flex items-center text-fgd-2 text-sm hover:text-fgd-1" | ||
href={`https://twitter.com/${realmInfo?.twitter}`} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<TwitterIcon className="mr-1.5 h-4 w-4" /> | ||
</a> | ||
) : null} | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default OrganzationsBackNav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const TwitterIcon = ({ className }) => { | ||
return ( | ||
<svg | ||
className={`${className}`} | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="24" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
stroke="currentColor" | ||
strokeWidth="2" | ||
strokeLinecap="round" | ||
> | ||
<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path> | ||
</svg> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type EndpointTypes = 'mainnet' | 'devnet' | 'localnet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,7 @@ module.exports = withTM({ | |
return config | ||
}, | ||
webpack5: false, | ||
env: { | ||
DAO: process.env.DAO, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.