Skip to content

Commit 54b7570

Browse files
committed
Merge branch 'master' into feat(subgraph)/curate-subgraph
2 parents 4dfde37 + 653f175 commit 54b7570

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1937
-102
lines changed

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
},
7373
"dependencies": {
7474
"@filebase/client": "^0.0.5",
75-
"@kleros/ui-components-library": "^2.6.3",
75+
"@kleros/ui-components-library": "^2.7.1",
7676
"@sentry/react": "^7.93.0",
7777
"@sentry/tracing": "^7.93.0",
7878
"@supabase/supabase-js": "^2.39.3",

web/src/app.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import Layout from "layout/index";
1212
import Home from "./pages/Home";
1313
import AllLists from "./pages/AllLists";
1414
import GraphqlBatcherProvider from "./context/GraphqlBatcher";
15+
import { SubmitItemProvider } from "./context/SubmitItemContext";
16+
import SubmitItem from "./pages/SubmitItem";
1517

1618
const App: React.FC = () => {
1719
return (
@@ -21,13 +23,16 @@ const App: React.FC = () => {
2123
<RefetchOnBlock />
2224
<Web3Provider>
2325
<IsListProvider>
24-
<SentryRoutes>
25-
<Route path="/" element={<Layout />}>
26-
<Route index element={<Home />} />
27-
<Route path="lists/*" element={<AllLists />} />
28-
<Route path="*" element={<h1>404 not found</h1>} />
29-
</Route>
30-
</SentryRoutes>
26+
<SubmitItemProvider>
27+
<SentryRoutes>
28+
<Route path="/" element={<Layout />}>
29+
<Route index element={<Home />} />
30+
<Route path="lists/*" element={<AllLists />} />
31+
<Route path="submitItem/*" element={<SubmitItem />} />
32+
<Route path="*" element={<h1>404 not found</h1>} />
33+
</Route>
34+
</SentryRoutes>
35+
</SubmitItemProvider>
3136
</IsListProvider>
3237
</Web3Provider>
3338
</GraphqlBatcherProvider>
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

web/src/assets/svgs/icons/plus.svg

Lines changed: 10 additions & 0 deletions
Loading

web/src/components/ChainIcon.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import PolygonIcon from "svgs/chains/polygon.svg";
66
import GnosisIcon from "svgs/chains/gnosis.svg";
77
import styled from "styled-components";
88

9-
const getChainIcon = (chainId: number) => {
9+
export const getChainIcon = (chainId: number) => {
1010
switch (chainId) {
1111
case mainnet.id:
1212
case sepolia.id:
@@ -25,6 +25,25 @@ const getChainIcon = (chainId: number) => {
2525
}
2626
};
2727

28+
export const getChainName = (chainId: number) => {
29+
switch (chainId) {
30+
case mainnet.id:
31+
case sepolia.id:
32+
return "Ethereum";
33+
case arbitrum.id:
34+
case arbitrumSepolia.id:
35+
return "Arbitrum";
36+
case gnosis.id:
37+
case gnosisChiado.id:
38+
return "Gnosis";
39+
case polygon.id:
40+
case polygonMumbai.id:
41+
return "Polygon";
42+
default:
43+
return "Ethereum";
44+
}
45+
};
46+
2847
const SVGContainer = styled.div`
2948
display: flex;
3049
align-items: center;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React from "react";
2+
import styled from "styled-components";
3+
import HistoryIcon from "assets/svgs/icons/history.svg";
4+
5+
const HeaderContainer = styled.div`
6+
display: flex;
7+
gap: 8px;
8+
`;
9+
10+
const StyledP = styled.p`
11+
margin: 0;
12+
color: ${({ theme }) => theme.primaryText};
13+
`;
14+
15+
const SVGContainer = styled.div`
16+
display: flex;
17+
align-items: center;
18+
justify-content: center;
19+
svg {
20+
fill: ${({ theme }) => theme.primaryText};
21+
height: 16px;
22+
width: 17px;
23+
}
24+
`;
25+
const Header: React.FC = () => {
26+
return (
27+
<HeaderContainer>
28+
<SVGContainer>
29+
<HistoryIcon />
30+
</SVGContainer>
31+
<StyledP>History</StyledP>
32+
</HeaderContainer>
33+
);
34+
};
35+
36+
export default Header;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Card, CustomTimeline, _TimelineItem1 as TimelineItem } from "@kleros/ui-components-library";
2+
import React from "react";
3+
import styled from "styled-components";
4+
import Header from "./Header";
5+
6+
const Container = styled(Card)`
7+
display: flex;
8+
width: 100%;
9+
height: auto;
10+
flex-direction: column;
11+
align-items: start;
12+
padding: 22px 32px;
13+
gap: 54px;
14+
`;
15+
16+
const StyledTimeline = styled(CustomTimeline)`
17+
width: 100%;
18+
margin-bottom: 30px;
19+
`;
20+
21+
interface IHistory {
22+
items: TimelineItem[];
23+
}
24+
25+
const History: React.FC<IHistory> = ({ items }) => {
26+
return (
27+
<Container>
28+
<Header />
29+
<StyledTimeline {...{ items }} />
30+
</Container>
31+
);
32+
};
33+
export default History;
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import React from "react";
2+
import styled, { css } from "styled-components";
3+
import { landscapeStyle } from "styles/landscapeStyle";
4+
import PolicyIcon from "svgs/icons/policy.svg";
5+
import { responsiveSize } from "styles/responsiveSize";
6+
// import { getIpfsUrl } from "utils/getIpfsUrl";
7+
8+
const ShadeArea = styled.div`
9+
display: flex;
10+
flex-direction: column;
11+
justify-content: center;
12+
width: 100%;
13+
padding: ${responsiveSize(16, 20)} ${responsiveSize(16, 32)};
14+
margin-top: 16px;
15+
background-color: ${({ theme }) => theme.mediumBlue};
16+
17+
${landscapeStyle(
18+
() => css`
19+
flex-direction: row;
20+
justify-content: space-between;
21+
`
22+
)};
23+
`;
24+
25+
const StyledP = styled.p`
26+
font-size: 14px;
27+
margin-top: 0;
28+
margin-bottom: 16px;
29+
color: ${({ theme }) => theme.primaryBlue};
30+
${landscapeStyle(
31+
() => css`
32+
margin-bottom: 0;
33+
`
34+
)};
35+
`;
36+
37+
const StyledA = styled.a`
38+
display: flex;
39+
align-items: center;
40+
gap: 4px;
41+
`;
42+
43+
const StyledPolicyIcon = styled(PolicyIcon)`
44+
width: 16px;
45+
fill: ${({ theme }) => theme.primaryBlue};
46+
`;
47+
48+
const LinkContainer = styled.div`
49+
display: flex;
50+
gap: ${responsiveSize(16, 24)};
51+
flex-wrap: wrap;
52+
`;
53+
54+
type Attachment = {
55+
label?: string;
56+
uri: string;
57+
};
58+
interface IPolicies {
59+
disputePolicyURI?: string;
60+
courtId?: string;
61+
attachment?: Attachment;
62+
}
63+
64+
export const Policies: React.FC<IPolicies> = ({ disputePolicyURI, courtId, attachment }) => {
65+
return (
66+
<ShadeArea>
67+
<StyledP>Make sure you read and understand the Policies</StyledP>
68+
<LinkContainer>
69+
<StyledA target="_blank" rel="noreferrer">
70+
<StyledPolicyIcon />
71+
Curation Policy
72+
</StyledA>
73+
<StyledA href={`#/courts/${courtId}/purpose?section=description`}>
74+
<StyledPolicyIcon />
75+
List Policy
76+
</StyledA>
77+
</LinkContainer>
78+
</ShadeArea>
79+
);
80+
};

0 commit comments

Comments
 (0)