Skip to content

Commit 95f1400

Browse files
committed
feat: setup structure for resolver miniguides
1 parent d701b0d commit 95f1400

File tree

3 files changed

+89
-1
lines changed

3 files changed

+89
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from "react";
2+
import styled from "styled-components";
3+
4+
import CrowdfundAppealSvg from "svgs/mini-guides/appeal/crowdfund-appeal.svg";
5+
6+
import { StyledImage } from "../PageContentsTemplate";
7+
8+
const StyledCrowdfundAppealSvg = styled(CrowdfundAppealSvg)`
9+
[class$="rect-bg"] {
10+
fill: ${({ theme }) => theme.whiteBackground};
11+
stroke: ${({ theme }) => theme.stroke};
12+
}
13+
14+
[class$="path-1"],
15+
[class$="path-2"],
16+
[class$="path-3"] {
17+
fill: ${({ theme }) => theme.primaryText};
18+
}
19+
20+
[class$="rect-fg"] {
21+
fill: ${({ theme }) => theme.whiteBackground};
22+
stroke: ${({ theme }) => theme.stroke};
23+
}
24+
25+
[class$="rect-accent"] {
26+
fill: ${({ theme }) => theme.primaryBlue};
27+
}
28+
29+
[class$="path-4"] {
30+
fill: ${({ theme }) => theme.whiteBackground};
31+
}
32+
33+
[class$="path-5"] {
34+
fill: ${({ theme }) => theme.secondaryText};
35+
}
36+
`;
37+
38+
const CrowdfundAppeal: React.FC = () => <StyledImage as={StyledCrowdfundAppealSvg} />;
39+
40+
export default CrowdfundAppeal;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from "react";
2+
3+
import PageContentsTemplate from "../PageContentsTemplate";
4+
5+
import CrowdfundAppeal from "./CrowdfundAppeal";
6+
7+
const leftPageContents = [
8+
{
9+
title: "Dispute Resolver",
10+
paragraphs: [
11+
"If after the jury has reached a decision, a party is not satisfied (because she thinks the result was" +
12+
" unfair), she can appeal and have the dispute ruled again.",
13+
"Every time the case is appealed a new round starts with all the voting options available for voting" +
14+
" again. The results of the previous rounds are irrelevant in terms of what the final result will be.",
15+
"Each new appeal instance will have twice the previous number of jurors plus one.",
16+
],
17+
},
18+
];
19+
20+
const rightPageComponents = [CrowdfundAppeal];
21+
22+
interface IDisputeResolver {
23+
toggleMiniGuide: () => void;
24+
}
25+
26+
const DisputeResolver: React.FC<IDisputeResolver> = ({ toggleMiniGuide }) => {
27+
return (
28+
<PageContentsTemplate
29+
toggleMiniGuide={toggleMiniGuide}
30+
leftPageContents={leftPageContents}
31+
rightPageComponents={rightPageComponents}
32+
isOnboarding={false}
33+
canClose={true}
34+
isVisible={true}
35+
/>
36+
);
37+
};
38+
39+
export default DisputeResolver;

web/src/pages/Resolver/index.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22
import styled, { css } from "styled-components";
33

44
import { Navigate, Route, Routes, useLocation } from "react-router-dom";
5+
import { useToggle } from "react-use";
56
import { useAccount } from "wagmi";
67

78
import { landscapeStyle } from "styles/landscapeStyle";
@@ -10,6 +11,8 @@ import { responsiveSize } from "styles/responsiveSize";
1011
import ConnectWallet from "components/ConnectWallet";
1112
import { EnsureAuth } from "components/EnsureAuth";
1213
import HeroImage from "components/HeroImage";
14+
import HowItWorks from "components/HowItWorks";
15+
import Resolver from "components/Popup/MiniGuides/DisputeResolver";
1316

1417
import Description from "./Briefing/Description";
1518
import Title from "./Briefing/Title";
@@ -67,9 +70,10 @@ const StyledLabel = styled.label`
6770

6871
const DisputeResolver: React.FC = () => {
6972
const location = useLocation();
70-
73+
const [isDisputeResolverMiniGuideOpen, toggleDisputeResolverMiniGuide] = useToggle(false);
7174
const { isConnected } = useAccount();
7275
const isPreviewPage = location.pathname.includes("/preview");
76+
7377
return (
7478
<>
7579
<HeroImage />
@@ -79,6 +83,11 @@ const DisputeResolver: React.FC = () => {
7983
<StyledEnsureAuth>
8084
<MiddleContentContainer>
8185
{isConnected && !isPreviewPage ? <Timeline /> : null}
86+
<HowItWorks
87+
isMiniGuideOpen={isDisputeResolverMiniGuideOpen}
88+
toggleMiniGuide={toggleDisputeResolverMiniGuide}
89+
MiniGuideComponent={Resolver}
90+
/>
8291
<Routes>
8392
<Route index element={<Navigate to="title" replace />} />
8493
<Route path="/title/*" element={<Title />} />

0 commit comments

Comments
 (0)