forked from aave/interface
-
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.
- Loading branch information
Showing
15 changed files
with
326 additions
and
147 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** @type {import('next').NextConfig} */ | ||
module.exports = { | ||
reactStrictMode: true, | ||
assetPrefix: "./", | ||
exportTrailingSlash: true, | ||
// assetPrefix: "./", | ||
trailingSlash: true, | ||
}; |
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
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,3 @@ | ||
export default function Markets() { | ||
return <div>hello</div>; | ||
} |
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,8 @@ | ||
import { useRouter } from "next/router"; | ||
|
||
export default function ReserveOverview() { | ||
const router = useRouter(); | ||
const underlyingAddress = router.query.underlyingAddress; | ||
|
||
return <div>{underlyingAddress}</div>; | ||
} |
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,3 @@ | ||
export default function TxnHistory() { | ||
return <div>hello</div>; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
import * as React from "react"; | ||
import clsx from "clsx"; | ||
import { useRouter } from "next/router"; | ||
import NextLink, { LinkProps as NextLinkProps } from "next/link"; | ||
import MuiLink, { LinkProps as MuiLinkProps } from "@mui/material/Link"; | ||
import { styled } from "@mui/material/styles"; | ||
|
||
// Add support for the sx prop for consistency with the other branches. | ||
const Anchor = styled("a")({}); | ||
|
||
interface NextLinkComposedProps | ||
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href">, | ||
Omit<NextLinkProps, "href" | "as"> { | ||
to: NextLinkProps["href"]; | ||
linkAs?: NextLinkProps["as"]; | ||
href?: NextLinkProps["href"]; | ||
} | ||
|
||
export const NextLinkComposed = React.forwardRef< | ||
HTMLAnchorElement, | ||
NextLinkComposedProps | ||
>(function NextLinkComposed(props, ref) { | ||
const { | ||
to, | ||
linkAs, | ||
href, | ||
replace, | ||
scroll, | ||
shallow, | ||
prefetch, | ||
locale, | ||
...other | ||
} = props; | ||
|
||
return ( | ||
<NextLink | ||
href={to} | ||
prefetch={prefetch} | ||
as={linkAs} | ||
replace={replace} | ||
scroll={scroll} | ||
shallow={shallow} | ||
passHref | ||
locale={locale} | ||
> | ||
<Anchor ref={ref} {...other} /> | ||
</NextLink> | ||
); | ||
}); | ||
|
||
export type LinkProps = { | ||
activeClassName?: string; | ||
as?: NextLinkProps["as"]; | ||
href: NextLinkProps["href"]; | ||
linkAs?: NextLinkProps["as"]; // Useful when the as prop is shallow by styled(). | ||
noLinkStyle?: boolean; | ||
} & Omit<NextLinkComposedProps, "to" | "linkAs" | "href"> & | ||
Omit<MuiLinkProps, "href">; | ||
|
||
// A styled version of the Next.js Link component: | ||
// https://nextjs.org/docs/#with-link | ||
export const Link = React.forwardRef<HTMLAnchorElement, LinkProps>( | ||
function Link(props, ref) { | ||
const { | ||
activeClassName = "active", | ||
as: linkAs, | ||
className: classNameProps, | ||
href, | ||
noLinkStyle, | ||
role, // Link don't have roles. | ||
...other | ||
} = props; | ||
|
||
const router = useRouter(); | ||
const pathname = typeof href === "string" ? href : href.pathname; | ||
const className = clsx(classNameProps, { | ||
[activeClassName]: router.pathname === pathname && activeClassName, | ||
}); | ||
|
||
const isExternal = | ||
typeof href === "string" && | ||
(href.indexOf("http") === 0 || href.indexOf("mailto:") === 0); | ||
|
||
if (isExternal) { | ||
if (noLinkStyle) { | ||
return ( | ||
<Anchor className={className} href={href} ref={ref} {...other} /> | ||
); | ||
} | ||
|
||
return <MuiLink className={className} href={href} ref={ref} {...other} />; | ||
} | ||
|
||
if (noLinkStyle) { | ||
return ( | ||
<NextLinkComposed | ||
className={className} | ||
ref={ref} | ||
to={href} | ||
{...other} | ||
/> | ||
); | ||
} | ||
|
||
return ( | ||
<MuiLink | ||
component={NextLinkComposed} | ||
linkAs={linkAs} | ||
className={className} | ||
ref={ref} | ||
to={href} | ||
{...other} | ||
/> | ||
); | ||
} | ||
); |
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,49 @@ | ||
import * as React from "react"; | ||
import { styled, alpha } from "@mui/material/styles"; | ||
import Box from "@mui/material/Box"; | ||
import Container from "@mui/material/Container"; | ||
import { Button } from "@mui/material"; | ||
import AaveLogo from "@mui/icons-material/GolfCourseSharp"; | ||
import { Link } from "../components/Link"; | ||
import MoreMenu from "./MoreMenu"; | ||
|
||
const Header = styled("header")(({ theme }) => ({ | ||
position: "sticky", | ||
top: 0, | ||
transition: theme.transitions.create("top"), | ||
zIndex: theme.zIndex.appBar, | ||
backdropFilter: "blur(20px)", | ||
boxShadow: `inset 0px -1px 1px ${ | ||
theme.palette.mode === "dark" | ||
? theme.palette.primaryDark[700] | ||
: theme.palette.grey[100] | ||
}`, | ||
backgroundColor: | ||
theme.palette.mode === "dark" | ||
? alpha(theme.palette.primaryDark[900], 0.72) | ||
: "rgba(255,255,255,0.72)", | ||
})); | ||
|
||
export default function AppHeader() { | ||
return ( | ||
<Header> | ||
<Container sx={{ display: "flex", alignItems: "center", minHeight: 64 }}> | ||
<Box | ||
component={Link} | ||
href={"/"} | ||
aria-label="Go to homepage" | ||
sx={{ lineHeight: 0, mr: 2 }} | ||
> | ||
<AaveLogo width={32} /> | ||
</Box> | ||
<Box sx={{ ml: "auto" }} /> | ||
<Box sx={{ display: { xs: "none", sm: "initial" }, mr: "12px" }}> | ||
<Button variant="outlined">Blog</Button> | ||
</Box> | ||
<Box color="inherit"> | ||
<MoreMenu /> | ||
</Box> | ||
</Container> | ||
</Header> | ||
); | ||
} |
Oops, something went wrong.