Skip to content

fix(web): add wrapper for home page #1639

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

Merged
merged 2 commits into from
Jul 2, 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
8 changes: 6 additions & 2 deletions web/src/pages/GetPnk/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import HeroImage from "components/HeroImage";

import { Widget } from "./Widget";

const Wrapper = styled.div`
width: 100%;
`;

const Container = styled.div`
width: 100%;
background-color: ${({ theme }) => theme.lightBackground};
Expand All @@ -25,13 +29,13 @@ const Container = styled.div`

const GetPnk: React.FC = () => {
return (
<>
<Wrapper>
<HeroImage />
<Container>
{!isProductionDeployment() && <ClaimPnkButton />}
<Widget />
</Container>
</>
</Wrapper>
);
};

Expand Down
20 changes: 13 additions & 7 deletions web/src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import Community from "./Community";
import CourtOverview from "./CourtOverview";
import TopJurors from "./TopJurors";

const Wrapper = styled.div`
width: 100%;
`;

const Container = styled.div`
width: 100%;
background-color: ${({ theme }) => theme.lightBackground};
Expand All @@ -24,13 +28,15 @@ const Container = styled.div`
const Home: React.FC = () => {
return (
<HomePageProvider timeframe={getOneYearAgoTimestamp()}>
<HeroImage />
<Container>
<CourtOverview />
<LatestCases />
<TopJurors />
<Community />
</Container>
<Wrapper>
<HeroImage />
<Container>
<CourtOverview />
<LatestCases />
<TopJurors />
<Community />
</Container>
</Wrapper>
</HomePageProvider>
);
};
Expand Down
8 changes: 6 additions & 2 deletions web/src/pages/Resolver/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ import Policy from "./Policy";
import Preview from "./Preview";
import Timeline from "./Timeline";

const Wrapper = styled.div`
width: 100%;
`;

const Container = styled.div`
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -71,7 +75,7 @@ const DisputeResolver: React.FC = () => {
const { isConnected } = useAccount();
const isPreviewPage = location.pathname.includes("/preview");
return (
<>
<Wrapper>
<HeroImage />
<Container>
{isConnected && !isPreviewPage ? <StyledLabel>Start a case</StyledLabel> : null}
Expand Down Expand Up @@ -101,7 +105,7 @@ const DisputeResolver: React.FC = () => {
</ConnectWalletContainer>
)}
</Container>
</>
</Wrapper>
);
};

Expand Down
Loading