diff --git a/components/Button.tsx b/components/Button.tsx index b2c2dc7e4d..fa6a48347f 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -29,7 +29,7 @@ const Button: FunctionComponent = ({ } text-sm focus:outline-none ${ disabled ? 'bg-fgd-4 cursor-not-allowed text-fgd-3' - : 'bg-primary-light text-bkg-2 hover:bg-primary-dark' + : 'bg-primary-light text-bkg-2 hover:bg-fgd-1' }`} {...props} style={style} @@ -58,7 +58,7 @@ export const SecondaryButton: FunctionComponent = ({ - - diff --git a/components/DiscordIcon.tsx b/components/DiscordIcon.tsx deleted file mode 100644 index 6283e77ad4..0000000000 --- a/components/DiscordIcon.tsx +++ /dev/null @@ -1,27 +0,0 @@ -const DiscordIcon = ({ className }) => { - return ( - - - - - - - ) -} - -export default DiscordIcon diff --git a/components/Footer.tsx b/components/Footer.tsx index f69f81079d..82f8770a48 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,6 +1,25 @@ -import DiscordIcon from './DiscordIcon' -import GithubIcon from './GithubIcon' -import TwitterIcon from './TwitterIcon' +import Image from 'next/image' + +const RelevantLinks = { + Docs: 'https://docs.realms.today/', + 'Programs Github': + '"https://github.com/solana-labs/solana-program-library/blob/master/governance/README.md"', +} + +const Socials = { + Twitter: { + url: 'https://twitter.com/solana', + imgSrc: '/icons/twitter.svg', + }, + Github: { + url: 'https://github.com/solana-labs/governance-ui', + imgSrc: '/icons/github.svg', + }, + Discord: { + url: 'https://discord.com/invite/VsPbrK2hJk', + imgSrc: '/icons/discord.svg', + }, +} const Footer = () => { const { REALM } = process.env @@ -8,57 +27,43 @@ const Footer = () => { if (REALM) return null else return ( -
-
- - Docs - - +
+
+ {Object.keys(RelevantLinks).map((linkTitle) => { + const href = RelevantLinks[linkTitle] + return ( + + {linkTitle} + + ) + })}
-
- - - - - - - - - +
+ {Object.keys(Socials).map((name) => { + const { url, imgSrc } = Socials[name] + return ( + + {name} + + ) + })}
-
-

+

+

Powered by

@@ -66,7 +71,7 @@ const Footer = () => { rel="noreferrer" href="https://solana.com/" target="_blank" - className="text-white text-base font-bold hover:text-primary-dark transition-all duration-200" + className="text-base font-bold default-transition hover:text-primary-dark" > Solana diff --git a/components/GithubIcon.tsx b/components/GithubIcon.tsx deleted file mode 100644 index ffa778eebe..0000000000 --- a/components/GithubIcon.tsx +++ /dev/null @@ -1,22 +0,0 @@ -const GithubIcon = ({ className }) => { - return ( - - - - ) -} - -export default GithubIcon diff --git a/components/Members/MembersTabs.tsx b/components/Members/MembersTabs.tsx index 8090a1bfb0..5ac1ad3871 100644 --- a/components/Members/MembersTabs.tsx +++ b/components/Members/MembersTabs.tsx @@ -105,7 +105,7 @@ const MemberItems = ({ address={new PublicKey(walletAddress)} height="32px" width="32px" - placeholder={} + placeholder={} /> ), [walletAddress] @@ -122,13 +122,13 @@ const MemberItems = ({ `} >
-
+
{renderAddressImage}
-

{renderAddressName}

-

Votes Cast: {votesCasted}

- +

{renderAddressName}

+

Votes Cast: {votesCasted}

+ {(communityAmount || !councilAmount) && ( {tokenName} Votes {communityAmount || 0} diff --git a/components/NavBar.tsx b/components/NavBar.tsx index dbfb4aca1b..6b07731754 100644 --- a/components/NavBar.tsx +++ b/components/NavBar.tsx @@ -9,20 +9,31 @@ const NavBar = () => { const { fmtUrlWithCluster } = useQueryContext() return ( -
-
+
+
-
- - {/*

Sierra

*/} +
+ + + +
-
- - +
+
+ + +
+
+ + +
) } diff --git a/components/PageBodyContainer.tsx b/components/PageBodyContainer.tsx index 368a1d261d..5ee9368ea7 100644 --- a/components/PageBodyContainer.tsx +++ b/components/PageBodyContainer.tsx @@ -1,5 +1,11 @@ const PageBodyContainer = ({ children }) => ( -
+
+
+ + + + +
{children}
diff --git a/components/RealmHeader.tsx b/components/RealmHeader.tsx index ba999b618a..841d703e58 100644 --- a/components/RealmHeader.tsx +++ b/components/RealmHeader.tsx @@ -27,7 +27,7 @@ const RealmHeader = () => { const realmUrl = `https://${explorerHost}/#/realm/${realmInfo?.realmId.toBase58()}?programId=${realmInfo?.programId.toBase58()}` return ( -
+
{ > {isBackNavVisible ? ( - - + + Back ) : null}
-
+
{realmDisplayName ? (
-
+
{realmInfo?.ogImage ? ( ) : ( @@ -62,21 +62,21 @@ const RealmHeader = () => {
) : ( -
+ diff --git a/components/Switch.tsx b/components/Switch.tsx index 570b3798de..793e93d312 100644 --- a/components/Switch.tsx +++ b/components/Switch.tsx @@ -24,7 +24,7 @@ const Switch: FunctionComponent = ({ diff --git a/components/TwitterIcon.tsx b/components/TwitterIcon.tsx deleted file mode 100644 index 013f634af2..0000000000 --- a/components/TwitterIcon.tsx +++ /dev/null @@ -1,22 +0,0 @@ -const TwitterIcon = ({ className }) => { - return ( - - - - ) -} - -export default TwitterIcon diff --git a/components/VoteResults.tsx b/components/VoteResults.tsx index f064686493..f9c94f7825 100644 --- a/components/VoteResults.tsx +++ b/components/VoteResults.tsx @@ -15,7 +15,7 @@ const VoteResults = ({ isListView, proposal }: VoteResultsProps) => { relativeYesVotes, } = useProposalVotes(proposal) return ( -
+
{proposal ? (
{

Yes Votes

{yesVoteCount.toLocaleString()} {isListView ? ( - + {relativeYesVotes?.toFixed(1)}% ) : null}

{!isListView ? ( -
+
{relativeYesVotes?.toFixed(1)}%
) : null}
-
+

No Votes

{noVoteCount.toLocaleString()} {isListView ? ( - + {relativeNoVotes?.toFixed(1)}% ) : null}

{!isListView ? ( -
+
{relativeNoVotes?.toFixed(1)}%
) : null} @@ -69,7 +69,7 @@ const VoteResults = ({ isListView, proposal }: VoteResultsProps) => {
) : ( <> -
+
)}
diff --git a/package.json b/package.json index fdc97786ed..31b4040a56 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@emotion/styled": "^11.8.1", "@friktion-labs/friktion-sdk": "^1.1.118", "@foresight-tmp/foresight-sdk": "^0.1.45", - "@headlessui/react": "^1.5.0", + "@headlessui/react": "^1.6.0", "@heroicons/react": "^1.0.1", "@marinade.finance/marinade-ts-sdk": "^2.0.9", "@metaplex-foundation/mpl-token-metadata": "^1.2.5", diff --git a/pages/_app.tsx b/pages/_app.tsx index 8332a4259c..9d321cbff7 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,5 +1,6 @@ import { ThemeProvider } from 'next-themes' import '@dialectlabs/react-ui/index.css' +// import '../styles/ambit-font.css' import '../styles/index.css' import useWallet from '../hooks/useWallet' import NavBar from '../components/NavBar' @@ -26,6 +27,7 @@ import useMembers from '@components/Members/useMembers' import TransactionLoader from '@components/TransactionLoader' import dynamic from 'next/dynamic' +import Head from 'next/head' const Notifications = dynamic(() => import('../components/Notification'), { ssr: false, }) @@ -54,15 +56,16 @@ function App({ Component, pageProps }) { const prevStringifyPossibleNftsAccounts = usePrevious( JSON.stringify(possibleNftsAccounts) ) - const title = realmName ? `${realmName}` : 'Solana Governance' + const title = realmName ? `${realmName}` : 'Realms' // Note: ?v==${Date.now()} is added to the url to force favicon refresh. // Without it browsers would cache the last used and won't change it for different realms // https://stackoverflow.com/questions/2208933/how-do-i-force-a-favicon-refresh - const faviconSelector = symbol ?? 'SOLANA' - const faviconUrl = `/realms/${getResourcePathPart( - faviconSelector as string - )}/favicon.ico?v=${Date.now()}` + const faviconUrl = + symbol && + `/realms/${getResourcePathPart( + symbol as string + )}/favicon.ico?v=${Date.now()}` useEffect(() => { if (realm?.pubkey) { loadMarket(connection, connection.cluster) @@ -96,30 +99,7 @@ function App({ Component, pageProps }) { wallet?.connected, client, ]) - //hack to remove 'Do not add