Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHomanics committed May 18, 2024
1 parent db5a8f8 commit 21b1964
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 25 deletions.
7 changes: 6 additions & 1 deletion packages/nextjs/app/collections/[network]/[address]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ export default function CollectionPage({ params }: { params: { network: string;
return (
<div className="flex flex-col items-center justify-center">
{/* {advancedOutput} */}
<Collection collection={collection} isLoading={isLoading} isError={isError} />
<Collection
collection={collection}
isLoading={isLoading}
isError={isError}
renderOrder={["Image", "Token Id", "Name", "Description", "Attributes"]}
/>
</div>
);
}
17 changes: 10 additions & 7 deletions packages/nextjs/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { hardhat } from "viem/chains";
import { CurrencyDollarIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline";
import { HeartIcon } from "@heroicons/react/24/outline";
import { SwitchTheme } from "~~/components/SwitchTheme";
import { BuidlGuidlLogo } from "~~/components/assets/BuidlGuidlLogo";
import { Faucet } from "~~/components/scaffold-eth";
import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork";
import { useGlobalState } from "~~/services/store/store";
Expand Down Expand Up @@ -47,7 +46,12 @@ export const Footer = () => {
<ul className="menu menu-horizontal w-full">
<div className="flex justify-center items-center gap-2 text-sm w-full">
<div className="text-center">
<a href="https://github.com/scaffold-eth/se-2" target="_blank" rel="noreferrer" className="link">
<a
href="https://github.com/atxdao/reputation-and-roles-monorepo"
target="_blank"
rel="noreferrer"
className="link"
>
Fork me
</a>
</div>
Expand All @@ -58,20 +62,19 @@ export const Footer = () => {
</p>
<a
className="flex justify-center items-center gap-1"
href="https://buidlguidl.com/"
href="https://atxdao.com/"
target="_blank"
rel="noreferrer"
>
<BuidlGuidlLogo className="w-3 h-5 pb-1" />
<span className="link">BuidlGuidl</span>
<span className="link">ATX DAO</span>
</a>
</div>
<span>·</span>
{/* <span>·</span>
<div className="text-center">
<a href="https://t.me/joinchat/KByvmRe5wkR-8F_zz6AjpA" target="_blank" rel="noreferrer" className="link">
Support
</a>
</div>
</div> */}
</div>
</ul>
</div>
Expand Down
62 changes: 50 additions & 12 deletions packages/nextjs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ export const menuLinks: HeaderMenuLink[] = [
label: "Home",
href: "/",
},
{
label: "Roles",
href: "/hats",
},
{
label: "Debug Contracts",
href: "/debug",
icon: <BugAntIcon className="h-4 w-4" />,
},
];

export const HeaderMenuLinks = () => {
Expand Down Expand Up @@ -88,19 +79,65 @@ export const Header = () => {
});

useEffect(() => {
if (location?.hostname === "localhost" || location?.hostname === "127.0.0.1") {
setOutput(
<ReputationTokenGroupCard tokens={tokens} components={widgetComponents} isBalanceOverlayed={true} size="xs" />,
);
}
}, [tokens.length]);

useEffect(() => {
const linksToAdd: any = [];

if (location?.hostname === "localhost" || location?.hostname === "127.0.0.1") {
linksToAdd.push({
label: "Roles",
href: "/hats",
});

linksToAdd.push({
label: "Debug Contracts",
href: "/debug",
icon: <BugAntIcon className="h-4 w-4" />,
});

// setInstancedHeaderLinks([
// ...instancedHeaderLinks,
// {
// label: "Roles",
// href: "/hats",
// },
// {
// label: "Debug Contracts",
// href: "/debug",
// icon: <BugAntIcon className="h-4 w-4" />,
// },
// ]);
}

if (Number(balanceOfClaimableHat2) > 0) {
console.log("im set");

linksToAdd.push({
label: "Steward's Hideout",
href: "/stewards-hideout",
});

setInstancedHeaderLinks([
...instancedHeaderLinks,
{
label: "Steward's Hideout",
href: "/stewards-hideout",
},
]);

setInstancedHeaderLinks([...instancedHeaderLinks, linksToAdd]);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [balanceOfClaimableHat2]);

const [output, setOutput] = useState<any>();

return (
<div className="sticky lg:static top-0 navbar bg-base-100 min-h-0 flex-shrink-0 justify-between z-20 shadow-md shadow-secondary px-0 sm:px-2">
<div className="navbar-start w-auto lg:w-1/2">
Expand Down Expand Up @@ -131,16 +168,17 @@ export const Header = () => {
<Image alt="SE2 logo" className="cursor-pointer" fill src="/logo.svg" />
</div>
<div className="flex flex-col">
<span className="font-bold leading-tight">Scaffold-ETH</span>
<span className="text-xs">Ethereum dev stack</span>
<span className="font-bold leading-tight">Reputation & Roles</span>
<span className="text-xs">Onchain tracking of trust</span>
</div>
</Link>
<ul className="hidden lg:flex lg:flex-nowrap menu menu-horizontal px-1 gap-2">
<HeaderMenuLinks />
</ul>
</div>
<div className="navbar-end flex-grow mr-4">
<ReputationTokenGroupCard tokens={tokens} components={widgetComponents} isBalanceOverlayed={true} size="xs" />
{output}
{/* <ReputationTokenGroupCard tokens={tokens} components={widgetComponents} isBalanceOverlayed={true} size="xs" /> */}

<RainbowKitCustomConnectButton />
<FaucetButton />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Collection = ({
mainContent = (
<>
<div className="w-full">
<CollectionDetails collection={collection} />
<CollectionDetails collection={collection} renderOrder={["Address"]} />
</div>
<div className="flex flex-wrap justify-center m-1 p-1 bg-base-100 rounded lg:max-w-[1300px]">
{tokensComponents}
Expand Down
Binary file added packages/nextjs/public/logo-transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/nextjs/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions packages/nextjs/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Scaffold-ETH 2 DApp",
"description": "A DApp built with Scaffold-ETH",
"iconPath": "logo.svg"
"name": "Reputation & Roles",
"description": "Onchain trust tracking and permissionless roles & authorities",
"iconPath": "logo-transparent.png"
}
2 changes: 1 addition & 1 deletion packages/nextjs/utils/scaffold-eth/getMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Metadata } from "next";
const baseUrl = process.env.VERCEL_PROJECT_PRODUCTION_URL
? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
: `http://localhost:${process.env.PORT || 3000}`;
const titleTemplate = "%s | Scaffold-ETH 2";
const titleTemplate = "%s | Reputation & Roles";

export const getMetadata = ({
title,
Expand Down

0 comments on commit 21b1964

Please sign in to comment.