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

Basin UI - Small fixes #615

Merged
merged 2 commits into from
Aug 23, 2023
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
6 changes: 6 additions & 0 deletions projects/dex-ui/src/components/Frame/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const Box = styled.a`
text-decoration: none;
color: black;
gap: 16px;
:hover {
background-color: #f0fdf4;
}
:first-child {
border-left: none;
}
Expand All @@ -60,6 +63,9 @@ const SmallBox = styled.a`
width: 64px;
border-left: 1px solid black;
justify-content: center;
:hover {
background-color: #f0fdf4;
}
`;

const StyledLink = styled.span`
Expand Down
16 changes: 13 additions & 3 deletions projects/dex-ui/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from "react";
import { size } from "src/breakpoints";
import { Link } from "react-router-dom";
import { RightArrow, RightArrowCircle } from "src/components/Icons";
import { RightArrowCircle } from "src/components/Icons";
import styled from "styled-components";

export const Home = () => {
Expand All @@ -24,8 +24,7 @@ export const Home = () => {
<SubTitle>
Customizable liquidity pools with shared components. &nbsp;
<WhitepaperLink href={"/basin.pdf"} target="_blank">
Read the whitepaper
<RightArrow color="#46B955" />
Read the whitepaper →
</WhitepaperLink>
</SubTitle>
</TitleSubtitleContainer>
Expand Down Expand Up @@ -144,6 +143,9 @@ const OracleWP = styled.a`
text-decoration: none;
display: flex;
align-items: center;
:hover {
text-decoration: underline;
}
`;

const WhitepaperLink = styled.a`
Expand All @@ -156,6 +158,10 @@ const WhitepaperLink = styled.a`
display: flex;
align-items: center;

:hover {
text-decoration: underline;
}

@media (min-width: ${size.mobile}) {
font-size: 20px;
line-height: 24px;
Expand Down Expand Up @@ -198,6 +204,10 @@ const Box = styled(Link)`
text-decoration: none;
color: black;

:hover {
background-color: #f0fdf4;
}

@media (min-width: ${size.mobile}) {
padding: 0px;
font-size: 24px;
Expand Down
5 changes: 3 additions & 2 deletions projects/dex-ui/src/pages/Liquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ export const Liquidity = () => {
run();
}, [well]);

if (loading) return <div>loading...</div>;
if (error) return <div>{error.message}</div>;
if (error) {
Log.module("Liquidity").error(`useWell(): ${error.message}`);
}

return (
<Page>
Expand Down
8 changes: 5 additions & 3 deletions projects/dex-ui/src/pages/Wells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useWells } from "src/wells/useWells";
import styled from "styled-components";
import { useAccount } from "wagmi";
import { size } from "src/breakpoints";
import { Log } from "src/utils/logger";

export const Wells = () => {
const { data: wells, isLoading, error } = useWells();
Expand Down Expand Up @@ -61,8 +62,9 @@ export const Wells = () => {
run();
}, [sdk, wells, address]);

if (isLoading) return <div>loading...</div>;
if (error) return <div>{error.message}</div>;
if (error) {
Log.module("Wells").error(`useWells(): ${error.message}`);
}

function WellRow(well: any, index: any) {
if (!well) return;
Expand Down Expand Up @@ -156,7 +158,7 @@ export const Wells = () => {
return tab === 0 ? WellRow(well, index) : MyLPsRow(well, index);
});

const anyLpPositions = !rows.every((row) => row === undefined);
const anyLpPositions = rows ? !rows.every((row) => row === undefined) : false;

return (
<Page>
Expand Down
1 change: 0 additions & 1 deletion projects/dex-ui/src/tokens/TokenProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const TokenContext = createContext(tokenMap);
export const TokenProvider = ({ children }: { children: React.ReactNode }) => {
const { data: tokens, isLoading, error } = useWellTokens();

if (isLoading) return <div>loading...</div>;
if (error) {
Log.module("TokenProvider").error(`useWellTokens(): ${error.message}`);
}
Expand Down