Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix routing #345

Merged
merged 5 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from "@heroicons/react/24/outline";
import Image from "next/image";
import { newLogo, commF } from "@/assets";
import { Button } from "@/components";
import { ChainIcon } from "@/configs/chainServer";

export default function Page() {
Expand All @@ -28,6 +29,8 @@ export default function Page() {
);
}

//TODO: route app buttons to app.gardens ..

const Hero = () => {
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
return (
Expand Down Expand Up @@ -74,13 +77,12 @@ const Hero = () => {
</div>
<div className="hidden lg:flex lg:flex-1 lg:justify-end">
<a
href="https://la74xhyqvjj.typeform.com/to/ocrTRQFb"
href="/gardens"
className="flex items-center justify-center text-sm font-semibold leading-6 text-gray-900"
target="_blank"
rel="noreferrer"
>
<span>Sign up </span>
<ArrowLongRightIcon className="ml-2 h-5 w-5" />
<Button>Launch App</Button>
</a>
</div>
</nav>
Expand Down Expand Up @@ -126,13 +128,12 @@ const Hero = () => {
</div>
<div className="py-6">
<a
href="https://la74xhyqvjj.typeform.com/to/ocrTRQFb"
className="flex w-full items-center justify-center bg-neutral-inverted-content py-1 text-center text-sm font-semibold leading-6 hover:opacity-95"
href="/gardens"
className="flex items-center justify-center text-sm font-semibold leading-6 text-gray-900"
target="_blank"
rel="noreferrer"
>
<span>Sign up </span>
<ArrowLongRightIcon className="ml-2 h-5 w-5" />
<Button>Launch App</Button>
</a>
</div>
</div>
Expand Down Expand Up @@ -356,21 +357,20 @@ const SignUp = () => {
<div className="mx-auto max-w-7xl sm:px-6 lg:px-8">
<div className="relative isolate overflow-hidden bg-neutral-content px-6 py-24 shadow-2xl sm:rounded-3xl sm:px-24 xl:py-32">
<h2 className="mx-auto max-w-2xl text-center text-3xl font-bold tracking-tight text-neutral sm:text-4xl">
Get ready for our beta release
Cultivate change with Gardens
</h2>
<p className="mx-auto mt-2 max-w-xl text-center text-lg leading-8 text-neutral-soft">
Coming August 2024!
Join our Beta and start growing your community.
</p>
<div className="mx-auto mt-10 flex max-w-md items-center justify-center gap-x-4 rounded-xl">
{/* TODO: link to gardnes form */}
<a
href="https://la74xhyqvjj.typeform.com/to/ocrTRQFb"
className="flex w-full items-center justify-center rounded-md bg-neutral-inverted-content py-1 text-center text-sm font-semibold leading-6 hover:opacity-95"
href="/gardens"
className="flex items-center justify-center text-sm font-semibold leading-6 text-gray-900"
target="_blank"
rel="noreferrer"
>
<span>Sign up </span>
<ArrowLongRightIcon className="ml-2 h-5 w-5" />
<Button>Launch App</Button>
</a>
</div>
<svg
Expand Down Expand Up @@ -459,8 +459,8 @@ const navigation = [
const Footer = () => {
return (
<footer className="bg-neutral">
<div className="mx-auto max-w-7xl px-6 py-12 md:flex md:items-center md:justify-between lg:px-8">
<div className="flex justify-center space-x-6 md:order-2">
<div className="mx-auto max-w-7xl px-6 py-12 md:flex md:flex-col md:items-center md:justify-between lg:px-8 gap-8">
<div className="flex justify-center space-x-6">
{navigation.map((item) => (
<a
key={item.name}
Expand All @@ -474,7 +474,7 @@ const Footer = () => {
</a>
))}
</div>
<div className="mt-8 md:order-1 md:mt-0">
<div className="mt-8 md:mt-0">
<p className="text-center text-xs leading-5 text-gray-500">
&copy; 2024 Gardens. All rights reserved.
</p>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/components/EthAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export const EthAddress = ({
address={address as Address}
explorer={(addr) => ({
name: chainDataMap[chain.id].name,
url: `${chainDataMap[chain.id].explorer}${addr}`,
accountUrl: `${chainDataMap[chain.id].explorer}${addr}`,
url: `${chainDataMap[chain.id].explorer}/address/${addr}`,
accountUrl: `${chainDataMap[chain.id].explorer}/address/${addr}`,
})}
ens={!chain?.testnet}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function NavBar() {
<div className="flex h-16 justify-between">
<div className="flex gap-8">
<div className="flex flex-shrink-0 items-center gap-4">
<Link href="/" className="flex items-center gap-3">
<Link href="/gardens" className="flex items-center gap-3">
<Image
src={newLogo}
alt="logo"
Expand Down
16 changes: 8 additions & 8 deletions apps/web/configs/chainServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,56 +54,56 @@ export const chainDataMap: {
421614: {
name: arbitrumSepolia.name,
icon: Arbitrum,
explorer: "https://sepolia.arbiscan.io/address/",
explorer: "https://sepolia-explorer.arbitrum.io",
blockTime: 0.23,
confirmations: 1, // 7
},
42161: {
name: arbitrum.name,
icon: Arbitrum,
explorer: "https://arbiscan.io/address/",
explorer: "https://arbitrum.blockscout.com",
blockTime: 0.23,
confirmations: 1, // 7
},
1: {
name: mainnet.name,
icon: Ethereum,
explorer: "https://etherscan.io/address/",
explorer: "https://eth.blockscout.com",
blockTime: 12,
confirmations: 1, // 3
},
11155111: {
name: sepolia.name,
icon: Ethereum,
explorer: "https://sepolia.etherscan.io/address/",
explorer: "https://eth-sepolia.blockscout.com",
blockTime: 12,
confirmations: 1, // 3
},
10: {
name: optimism.name,
icon: Optimism,
explorer: "https://optimistic.etherscan.io/address/",
explorer: "https://optimism.blockscout.com",
blockTime: 2,
confirmations: 1, // 2
},
11155420: {
name: optimismSepolia.name,
icon: Optimism,
explorer: "https://sepolia-optimism.etherscan.io/address/",
explorer: "https://optimism-sepolia.blockscout.com",
blockTime: 2,
confirmations: 1, // 2
},
100: {
name: gnosis.name,
icon: GnosisGno,
explorer: "https://gnosisscan.io/address/",
explorer: "https://gnosis.blockscout.com",
blockTime: 5.2,
confirmations: 1, // 4
},
137: {
name: polygon.name,
icon: Polygon,
explorer: "https://polygonscan.com/address/",
explorer: "https://polygon.blockscout.com",
blockTime: 2.1,
confirmations: 1, // 4
},
Expand Down
5 changes: 3 additions & 2 deletions apps/web/hooks/useTransactionNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { WriteContractResult } from "wagmi/actions";
import { useChainFromPath } from "./useChainFromPath";
import { useContractWriteWithConfirmations } from "./useContractWriteWithConfirmations";
import { TxWaitingForSig, TxError, TxSuccess, TxInProgress } from "@/assets";
import { chainDataMap } from "@/configs/chainServer";
import { NOTIFICATION_AUTO_CLOSE_DELAY } from "@/globals";

type TransactionData = WriteContractResult | undefined;
Expand Down Expand Up @@ -56,7 +57,7 @@ export const useTransactionNotification = ({

const clickToExplorer = () =>
window.open(
`${chain?.blockExplorers?.default.url}/tx/${transactionData?.hash}`,
`${chainDataMap[chain?.id ?? 0].explorer}/tx/${transactionData?.hash}`,
"_blank",
);

Expand Down Expand Up @@ -184,7 +185,7 @@ export const TransactionStatusNotification = ({
<div className={showClickToExplorer ? textColor : ""}>{message}</div>
{chain?.blockExplorers?.default.url && showClickToExplorer && (
<div className="w-full text-sm italic">
Click to see in {chain.blockExplorers.default.name}
Click to see in Blockscout
</div>
)}
</div>
Expand Down
Loading