diff --git a/middleware.ts b/middleware.ts deleted file mode 100644 index f3691abd..00000000 --- a/middleware.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NextResponse } from 'next/server' -import type { NextRequest } from 'next/server' - -export function middleware(request: NextRequest) { - const url = request.nextUrl.clone() - if (url.pathname === '/pool/create' || url.pathname === '/deal/create') { - url.pathname = '/' - return NextResponse.redirect(url) - } -} diff --git a/pages/index.tsx b/pages/index.tsx index 96d1f7d6..0aa2f78a 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,15 +1,38 @@ import type { NextPage } from 'next' import Head from 'next/head' +import { useRouter } from 'next/router' +import styled from 'styled-components' import { LeftSidebarLayout } from '@/src/components/layout/LeftSidebarLayout' import { ListWithFilters } from '@/src/components/pools/list/ListWithFilters' import { VouchedPools } from '@/src/components/pools/list/Vouched' +import { ButtonType } from '@/src/components/pureStyledComponents/buttons/Button' +import { SectionIntro as BaseSectionIntro } from '@/src/components/section/SectionIntro' import { ThemeType } from '@/src/constants/types' import useAelinUser from '@/src/hooks/aelin/useAelinUser' import { useThemeContext } from '@/src/providers/themeContextProvider' import { useWeb3Connection } from '@/src/providers/web3ConnectionProvider' +const Container = styled.div` + display: flex; + flex-direction: row; + width: 100%; + gap: 1.5rem; +` + +const SectionIntro = styled(BaseSectionIntro)` + display: flex; + flex-direction: column; + flex: 1 1 0px; + justify-content: space-between; + + @media (min-width: ${({ theme }) => theme.themeBreakPoints.tabletPortraitStart}) { + max-height: 260px; + } +` + const Home: NextPage = () => { + const router = useRouter() const { address } = useWeb3Connection() const { data: userResponse } = useAelinUser(address) @@ -23,6 +46,47 @@ const Home: NextPage = () => { Aelin - Pools List + + router.push('/deal/create'), + type: ButtonType.Secondary, + }, + ]} + title="Deals" + > + Direct Deals are for new and established protocols looking to raise capital from + investors at pre-established deal terms. Aelin Deals allow for customizable features, + such as a defined vesting period and a vesting cliff. + + router.push('/pool/create'), + type: ButtonType.Primary, + }, + ]} + title="Pools" + > + Pools are for protocols/sponsors that don't have set deal terms yet but are gauging + investor interest. Pools are best suited for protocols without a set target valuation + and sponsors using Aelin to source a future deal. Aelin Pools are most similar to SPACs. + + + {!isLizardTheme && } diff --git a/src/components/pools/actions/AcceptDeal.tsx b/src/components/pools/actions/AcceptDeal.tsx index 95a19dba..58dc181e 100644 --- a/src/components/pools/actions/AcceptDeal.tsx +++ b/src/components/pools/actions/AcceptDeal.tsx @@ -96,7 +96,17 @@ function AcceptDeal({ pool }: Props) { setValue={setTokenInputValue} value={tokenInputValue} /> - + Accept deal diff --git a/src/components/pools/actions/Approve.tsx b/src/components/pools/actions/Approve.tsx index 53eb72b9..052948f7 100644 --- a/src/components/pools/actions/Approve.tsx +++ b/src/components/pools/actions/Approve.tsx @@ -79,7 +79,12 @@ export default function Approve({ {allowance && symbol && } {description} - + Approve diff --git a/src/components/pools/actions/Deposit/Deposit.tsx b/src/components/pools/actions/Deposit/Deposit.tsx index 742aa168..91384d4c 100644 --- a/src/components/pools/actions/Deposit/Deposit.tsx +++ b/src/components/pools/actions/Deposit/Deposit.tsx @@ -222,13 +222,23 @@ function Deposit({ pool, poolHelpers }: Props) { /> )} - + Deposit {pool.hasNftList && ( - - Select NFT - + Select NFT )} diff --git a/src/components/pools/actions/Deposit/DepositDirectDeal.tsx b/src/components/pools/actions/Deposit/DepositDirectDeal.tsx index 58778d49..ab534902 100644 --- a/src/components/pools/actions/Deposit/DepositDirectDeal.tsx +++ b/src/components/pools/actions/Deposit/DepositDirectDeal.tsx @@ -275,7 +275,16 @@ function DepositDirectDeal({ pool, poolHelpers }: Props) { { depositTokens() }} @@ -283,9 +292,7 @@ function DepositDirectDeal({ pool, poolHelpers }: Props) { {pool?.upfrontDeal ? 'Accept Deal' : 'Deposit'} {pool.hasNftList && ( - - Select NFT - + Select NFT )} diff --git a/src/components/pools/actions/HolderDeposit/HolderDeposit.tsx b/src/components/pools/actions/HolderDeposit/HolderDeposit.tsx index 2d592761..0d100f5a 100644 --- a/src/components/pools/actions/HolderDeposit/HolderDeposit.tsx +++ b/src/components/pools/actions/HolderDeposit/HolderDeposit.tsx @@ -60,7 +60,10 @@ function HolderDeposit({ pool }: Props) { return ( <> - + Fund Deal diff --git a/src/components/pools/actions/HolderDeposit/HolderDepositUpfrontDeal.tsx b/src/components/pools/actions/HolderDeposit/HolderDepositUpfrontDeal.tsx index 010004ac..b8467a71 100644 --- a/src/components/pools/actions/HolderDeposit/HolderDepositUpfrontDeal.tsx +++ b/src/components/pools/actions/HolderDeposit/HolderDepositUpfrontDeal.tsx @@ -62,7 +62,10 @@ function HolderDepositUpfrontDeal({ pool }: Props) { return ( <> - + Fund Deal diff --git a/src/components/pools/actions/Vouch/Vouch.tsx b/src/components/pools/actions/Vouch/Vouch.tsx index 8614b9dc..66ef8893 100644 --- a/src/components/pools/actions/Vouch/Vouch.tsx +++ b/src/components/pools/actions/Vouch/Vouch.tsx @@ -146,7 +146,10 @@ const Vouch: React.FC<{ pool: ParsedAelinPool }> = genericSuspense(({ pool }) => <>Vouching not supported )} - + {hasVouched ? 'Disavow' : 'Vouch'}