-
-
-
+
{registries?.length === 0 ? (
No lists found
) : (
diff --git a/web/src/components/RegistryCard/StatusBanner.tsx b/web/src/components/RegistryCard/StatusBanner.tsx
index b533b77..9bc32d0 100644
--- a/web/src/components/RegistryCard/StatusBanner.tsx
+++ b/web/src/components/RegistryCard/StatusBanner.tsx
@@ -45,7 +45,7 @@ interface IStatusBanner {
isList?: boolean;
}
-const getStatusColor = (status: Status, theme: Theme): [string, string] => {
+export const getStatusColor = (status: Status, theme: Theme): [string, string] => {
switch (status) {
case Status.Pending:
return [theme.primaryBlue, theme.mediumBlue];
@@ -60,7 +60,7 @@ const getStatusColor = (status: Status, theme: Theme): [string, string] => {
}
};
-const getStatusLabel = (status: Status): string => {
+export const getStatusLabel = (status: Status): string => {
switch (status) {
case Status.Pending:
return "Pending";
diff --git a/web/src/components/RegistryCard/index.tsx b/web/src/components/RegistryCard/index.tsx
index 2487d12..f4a2568 100644
--- a/web/src/components/RegistryCard/index.tsx
+++ b/web/src/components/RegistryCard/index.tsx
@@ -1,12 +1,12 @@
import React from "react";
import styled, { css } from "styled-components";
-import { useNavigate } from "react-router-dom";
import { Card } from "@kleros/ui-components-library";
import { useIsList } from "context/IsListProvider";
import { landscapeStyle } from "styles/landscapeStyle";
import { lists } from "consts/index";
import StatusBanner from "./StatusBanner";
import RegistryInfo from "./RegistryInfo";
+import { useNavigateAndScrollTop } from "hooks/useNavigateAndScrollTop";
const StyledCard = styled(Card)`
width: 100%;
@@ -32,17 +32,17 @@ interface IListCard extends List {
const RegistryCard: React.FC
= ({ id, title, logoURI, totalItems, status, chainId, overrideIsList }) => {
const { isList } = useIsList();
+ const navigateAndScrollTop = useNavigateAndScrollTop();
- const navigate = useNavigate();
return (
<>
{!isList || overrideIsList ? (
- navigate(`/lists/${id.toString()}`)}>
+ navigateAndScrollTop(`/lists/${id.toString()}/display/1/desc/all`)}>
) : (
- navigate(`/lists/${id.toString()}`)}>
+ navigateAndScrollTop(`/lists/${id.toString()}/display/desc/all`)}>
)}
diff --git a/web/src/components/RegistriesDisplay/Filters.tsx b/web/src/components/StatsAndFilters/Filters.tsx
similarity index 73%
rename from web/src/components/RegistriesDisplay/Filters.tsx
rename to web/src/components/StatsAndFilters/Filters.tsx
index 52ec0b5..763da14 100644
--- a/web/src/components/RegistriesDisplay/Filters.tsx
+++ b/web/src/components/StatsAndFilters/Filters.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import styled, { useTheme } from "styled-components";
+import styled from "styled-components";
import { useNavigate, useParams } from "react-router-dom";
import { useWindowSize } from "react-use";
import { DropdownSelect } from "@kleros/ui-components-library";
@@ -7,7 +7,7 @@ import { useIsList } from "context/IsListProvider";
import ListIcon from "svgs/icons/list.svg";
import GridIcon from "svgs/icons/grid.svg";
import { BREAKPOINT_LANDSCAPE } from "styles/landscapeStyle";
-import { decodeURIFilter, encodeURIFilter, useRootPath } from "utils/uri";
+import { useItemRootPath, useListRootPath } from "utils/uri";
const Container = styled.div`
display: flex;
@@ -40,23 +40,17 @@ const StyledListIcon = styled(ListIcon)`
height: 16px;
overflow: hidden;
`;
-
-const Filters: React.FC = () => {
- const theme = useTheme();
+export interface IFilters {
+ isListFilter: boolean;
+}
+const Filters: React.FC = ({ isListFilter = false }) => {
const { order, filter } = useParams();
- const { ruled, period, ...filterObject } = decodeURIFilter(filter ?? "all");
const navigate = useNavigate();
- const location = useRootPath();
-
- const handleStatusChange = (value: string | number) => {
- const parsedValue = JSON.parse(value as string);
- const encodedFilter = encodeURIFilter({ ...filterObject, ...parsedValue });
- navigate(`${location}/1/${order}/${encodedFilter}`);
- };
+ const locationAllLists = useListRootPath();
+ const locationList = useItemRootPath();
const handleOrderChange = (value: string | number) => {
- const encodedFilter = encodeURIFilter({ ruled, period, ...filterObject });
- navigate(`${location}/1/${value}/${encodedFilter}`);
+ navigate(`${isListFilter ? locationAllLists : locationList}/1/${value}/${filter}`);
};
const { width } = useWindowSize();
@@ -68,6 +62,7 @@ const Filters: React.FC = () => {
{
defaultValue={order}
callback={handleOrderChange}
/>
- {screenIsBig ? (
+ {screenIsBig && isListFilter ? (
{isList ? (
setIsList(false)} />
diff --git a/web/src/components/RegistriesDisplay/Stats.tsx b/web/src/components/StatsAndFilters/Stats.tsx
similarity index 84%
rename from web/src/components/RegistriesDisplay/Stats.tsx
rename to web/src/components/StatsAndFilters/Stats.tsx
index d96c929..7f741ae 100644
--- a/web/src/components/RegistriesDisplay/Stats.tsx
+++ b/web/src/components/StatsAndFilters/Stats.tsx
@@ -24,13 +24,16 @@ const Field: React.FC<{ label: string; value: string }> = ({ label, value }) =>
const Separator: React.FC = () => |;
+type Field = {
+ label: string;
+ value: string;
+};
+
export interface IStats {
- totalRegistries: number;
+ fields: Field[];
}
-const Stats: React.FC = ({ totalRegistries }) => {
- const fields = [{ label: "Lists", value: totalRegistries.toString() }];
-
+const Stats: React.FC = ({ fields }) => {
return (
{fields.map(({ label, value }, i) => (
diff --git a/web/src/components/RegistriesDisplay/StatsAndFilters.tsx b/web/src/components/StatsAndFilters/index.tsx
similarity index 62%
rename from web/src/components/RegistriesDisplay/StatsAndFilters.tsx
rename to web/src/components/StatsAndFilters/index.tsx
index e840e4e..52fe1a1 100644
--- a/web/src/components/RegistriesDisplay/StatsAndFilters.tsx
+++ b/web/src/components/StatsAndFilters/index.tsx
@@ -1,7 +1,7 @@
import React from "react";
import styled from "styled-components";
-import Filters from "./Filters";
import Stats, { IStats } from "./Stats";
+import Filters, { IFilters } from "./Filters";
const Container = styled.div`
display: flex;
@@ -12,10 +12,10 @@ const Container = styled.div`
justify-content: space-between;
`;
-const StatsAndFilters: React.FC
= ({ totalRegistries }) => (
+const StatsAndFilters: React.FC = ({ fields, isListFilter }) => (
-
-
+
+
);
diff --git a/web/src/consts/index.ts b/web/src/consts/index.ts
index 54a5fe7..8dd3725 100644
--- a/web/src/consts/index.ts
+++ b/web/src/consts/index.ts
@@ -69,3 +69,41 @@ export const lists = [
logoURI: "https://ipfs.kleros.io//ipfs/QmZPeWnzHGKwvnckQE2QrdRJiUFqQXvQEZGFHdEAh7raHN/fno.png",
},
];
+
+export const items = [
+ {
+ id: 1,
+ title: "ENS Resolver",
+ address: "0x922911F4f80a569a4425fa083456239838F7F003",
+ website: "metamask.io",
+ status: Status.Removed,
+ },
+ {
+ id: 2,
+ title: "ENS Resolver",
+ address: "0x922911F4f80a569a4425fa083456239838F7F003",
+ website: "metamask.io",
+ status: Status.Removed,
+ },
+ {
+ id: 3,
+ title: "ENS Resolver",
+ address: "0x922911F4f80a569a4425fa083456239838F7F003",
+ website: "metamask.io",
+ status: Status.Removed,
+ },
+ {
+ id: 4,
+ title: "ENS Resolver",
+ address: "0x922911F4f80a569a4425fa083456239838F7F003",
+ website: "metamask.io",
+ status: Status.Removed,
+ },
+ {
+ id: 5,
+ title: "ENS Resolver",
+ address: "0x922911F4f80a569a4425fa083456239838F7F003",
+ website: "metamask.io",
+ status: Status.Removed,
+ },
+];
diff --git a/web/src/context/SubmitItemContext.tsx b/web/src/context/SubmitItemContext.tsx
new file mode 100644
index 0000000..5bf508a
--- /dev/null
+++ b/web/src/context/SubmitItemContext.tsx
@@ -0,0 +1,48 @@
+import React, { createContext, useContext, useMemo } from "react";
+import { useLocalStorage } from "hooks/useLocalStorage";
+
+export interface ISubmitItemContext {
+ fieldOne: string;
+ setFieldOne: (title: string) => void;
+ resetItemData: () => void;
+ isPolicyRead: boolean;
+ setIsPolicyRead: (isRead: boolean) => void;
+}
+
+const initialSubmitItemContext: ISubmitItemContext = {
+ fieldOne: "",
+ setFieldOne: () => {},
+ resetItemData: () => {},
+ isPolicyRead: false,
+ setIsPolicyRead: () => {},
+};
+
+const SubmitItemContext = createContext(initialSubmitItemContext);
+
+export const useSubmitItemContext = () => useContext(SubmitItemContext);
+
+export const SubmitItemProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
+ const [fieldOne, setFieldOne] = useLocalStorage("fieldOne", initialSubmitItemContext.fieldOne);
+ const [isPolicyRead, setIsPolicyRead] = useLocalStorage(
+ "isPolicyRead",
+ initialSubmitItemContext.isPolicyRead
+ );
+
+ const resetItemData = () => {
+ setFieldOne(initialSubmitItemContext.fieldOne);
+ setIsPolicyRead(initialSubmitItemContext.isPolicyRead);
+ };
+
+ const contextValues = useMemo(
+ () => ({
+ fieldOne,
+ setFieldOne,
+ resetItemData,
+ isPolicyRead,
+ setIsPolicyRead,
+ }),
+ [fieldOne, isPolicyRead]
+ );
+
+ return {children};
+};
diff --git a/web/src/hooks/useNavigateAndScrollTop.ts b/web/src/hooks/useNavigateAndScrollTop.ts
new file mode 100644
index 0000000..0929bfa
--- /dev/null
+++ b/web/src/hooks/useNavigateAndScrollTop.ts
@@ -0,0 +1,15 @@
+import { useContext } from "react";
+import { useNavigate } from "react-router-dom";
+import { OverlayScrollContext } from "context/OverlayScrollContext";
+
+export const useNavigateAndScrollTop = () => {
+ const navigate = useNavigate();
+ const osInstanceRef = useContext(OverlayScrollContext);
+
+ const navigateAndScrollTop = (path) => {
+ navigate(path);
+ osInstanceRef?.current?.osInstance().elements().viewport.scroll({ top: 0 });
+ };
+
+ return navigateAndScrollTop;
+};
diff --git a/web/src/pages/AllLists/Item/index.tsx b/web/src/pages/AllLists/Item/index.tsx
new file mode 100644
index 0000000..a524c0a
--- /dev/null
+++ b/web/src/pages/AllLists/Item/index.tsx
@@ -0,0 +1,49 @@
+import React from "react";
+import InformationCard from "components/InformationCard";
+import History from "~src/components/HistoryDisplay";
+import { useTheme } from "styled-components";
+import ClosedIcon from "assets/svgs/icons/check-circle-outline.svg";
+
+interface IItems {
+ title: string;
+ description: string;
+ className?: string;
+}
+
+const ItemDisplay: React.FC = ({
+ title = "Address Tags",
+ description = "A list of public name tags, associated with Ethereum mainnet contract addresses.",
+ className,
+}) => {
+ const theme = useTheme();
+ const historyItems = [
+ {
+ title: "Item Submitted",
+ variant: theme.primaryBlue,
+ subtitle: "April 06, 2022",
+ rightSided: true,
+ },
+ {
+ title: "Item Challenged",
+ party: "- Case #1369 by Alice.eth",
+ variant: theme.secondaryPurple,
+ subtitle: "April 07, 2022",
+ rightSided: true,
+ },
+ {
+ title: "Item Submitted",
+ subtitle: "April 06, 2022",
+ rightSided: true,
+ Icon: ClosedIcon,
+ },
+ ];
+
+ return (
+
+
+
+
+ );
+};
+
+export default ItemDisplay;
diff --git a/web/src/pages/AllLists/RegistriesFetcher.tsx b/web/src/pages/AllLists/RegistriesFetcher.tsx
index 8fbc2ea..8620719 100644
--- a/web/src/pages/AllLists/RegistriesFetcher.tsx
+++ b/web/src/pages/AllLists/RegistriesFetcher.tsx
@@ -1,7 +1,7 @@
import React, { useMemo } from "react";
import { useParams, useNavigate } from "react-router-dom";
import { useWindowSize } from "react-use";
-import { useRootPath, decodeURIFilter } from "utils/uri";
+import { useListRootPath, decodeListURIFilter } from "utils/uri";
import { useAccount } from "wagmi";
// import { useRegistriesQuery } from "hooks/queries/useRegistriesQuery";
import RegistriesDisplay from "components/RegistriesDisplay";
@@ -13,7 +13,7 @@ const RegistriesFetcher: React.FC = () => {
const { page, order, filter } = useParams();
const navigate = useNavigate();
const { width } = useWindowSize();
- const location = useRootPath();
+ const location = useListRootPath();
const screenIsBig = width > BREAKPOINT_LANDSCAPE;
const registriesPerPage = screenIsBig ? 9 : 3;
const pageNumber = parseInt(page ?? "1", 10);
diff --git a/web/src/pages/AllLists/RegistryDetails/List/index.tsx b/web/src/pages/AllLists/RegistryDetails/List/index.tsx
new file mode 100644
index 0000000..dd5c61f
--- /dev/null
+++ b/web/src/pages/AllLists/RegistryDetails/List/index.tsx
@@ -0,0 +1,30 @@
+import React from "react";
+import Search from "../Search";
+import StatsAndFilters from "~src/components/StatsAndFilters";
+import styled from "styled-components";
+import { items } from "consts/index";
+import ItemCard from "components/ItemCard";
+
+const ListContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ gap: 8px;
+`;
+
+interface IList {}
+
+const List: React.FC = ({}) => {
+ return (
+ <>
+
+
+
+ {items.map((item) => (
+
+ ))}
+
+ >
+ );
+};
+export default List;
diff --git a/web/src/pages/AllLists/RegistryDetails/Search.tsx b/web/src/pages/AllLists/RegistryDetails/Search.tsx
new file mode 100644
index 0000000..616904f
--- /dev/null
+++ b/web/src/pages/AllLists/RegistryDetails/Search.tsx
@@ -0,0 +1,92 @@
+import React, { useState } from "react";
+import styled, { css } from "styled-components";
+import { landscapeStyle } from "styles/landscapeStyle";
+import { useNavigate, useParams } from "react-router-dom";
+import { useDebounce } from "react-use";
+import { Searchbar, DropdownSelect, Button } from "@kleros/ui-components-library";
+import { decodeItemURIFilter, encodeItemURIFilter, useItemRootPath } from "utils/uri";
+import PlusIcon from "svgs/icons/plus.svg";
+
+const StyledPlusIcon = styled(PlusIcon)`
+ path {
+ fill: ${({ theme }) => theme.whiteBackground};
+ }
+`;
+
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+ margin-bottom: 16px;
+
+ ${landscapeStyle(
+ () =>
+ css`
+ flex-direction: row;
+ `
+ )}
+`;
+
+const SearchBarContainer = styled.div`
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
+ z-index: 0;
+`;
+
+const StyledSearchbar = styled(Searchbar)`
+ flex: 1;
+ flex-basis: 310px;
+ input {
+ font-size: 16px;
+ height: 45px;
+ padding-top: 0px;
+ padding-bottom: 0px;
+ }
+`;
+
+const Search: React.FC = () => {
+ const { page, order, filter } = useParams();
+ const location = useItemRootPath();
+ const decodedFilter = decodeItemURIFilter(filter ?? "all");
+ const { id: searchValue, ...filterObject } = decodedFilter;
+ const [search, setSearch] = useState(searchValue ?? "");
+ const navigate = useNavigate();
+ useDebounce(
+ () => {
+ const newFilters = search === "" ? { ...filterObject } : { ...filterObject, id: search };
+ const encodedFilter = encodeItemURIFilter(newFilters);
+ navigate(`${location}/${page}/${order}/${encodedFilter}`);
+ },
+ 500,
+ [search]
+ );
+
+ return (
+
+
+ setSearch(e.target.value)}
+ />
+
+ {}}
+ />
+
+ );
+};
+
+export default Search;
diff --git a/web/src/pages/AllLists/RegistryDetails/Tabs.tsx b/web/src/pages/AllLists/RegistryDetails/Tabs.tsx
new file mode 100644
index 0000000..1408ab4
--- /dev/null
+++ b/web/src/pages/AllLists/RegistryDetails/Tabs.tsx
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import styled from "styled-components";
+import { useNavigate, useLocation, useParams } from "react-router-dom";
+import { Tabs as TabsComponent } from "@kleros/ui-components-library";
+import PaperIcon from "assets/svgs/icons/paper.svg";
+import HistoryIcon from "assets/svgs/icons/history.svg";
+
+const StyledTabs = styled(TabsComponent)`
+ width: 100%;
+ margin-bottom: 48px;
+ > * {
+ display: flex;
+ flex-wrap: wrap;
+ > svg {
+ margin-right: 8px !important;
+ }
+ }
+`;
+
+const TABS = [
+ {
+ text: "List",
+ value: 0,
+ Icon: PaperIcon,
+ path: "list",
+ },
+ {
+ text: "History",
+ value: 1,
+ Icon: HistoryIcon,
+ path: "history",
+ },
+];
+
+const Tabs: React.FC = () => {
+ const navigate = useNavigate();
+ const { id } = useParams();
+ const location = useLocation();
+ const currentPathName = location.pathname.split("/").at(3);
+
+ const findTabIndex = (pathName) => TABS.findIndex(({ path }) => pathName.startsWith(path));
+ const [currentTab, setCurrentTab] = useState(findTabIndex(currentPathName));
+
+ useEffect(() => {
+ const newTabIndex = findTabIndex(currentPathName);
+ if (currentTab !== newTabIndex) {
+ setCurrentTab(newTabIndex);
+ }
+ }, [currentPathName, currentTab]);
+
+ const handleTabChange = (n: number) => {
+ if (n !== currentTab) {
+ setCurrentTab(n);
+ navigate(`/lists/${id}/${TABS[n].path}`);
+ }
+ };
+
+ return ;
+};
+
+export default Tabs;
diff --git a/web/src/pages/AllLists/RegistryDetails/index.tsx b/web/src/pages/AllLists/RegistryDetails/index.tsx
new file mode 100644
index 0000000..870be5b
--- /dev/null
+++ b/web/src/pages/AllLists/RegistryDetails/index.tsx
@@ -0,0 +1,62 @@
+import React from "react";
+import { IRegistriesGrid } from "components/RegistriesDisplay/RegistriesGrid";
+import InformationCard from "components/InformationCard";
+import Tabs from "./Tabs";
+import List from "./List";
+import History from "components/HistoryDisplay";
+import { Navigate, Route, Routes } from "react-router-dom";
+import { useTheme } from "styled-components";
+import ClosedIcon from "assets/svgs/icons/check-circle-outline.svg";
+
+interface IRegistryDetails extends IRegistriesGrid {
+ items: [];
+ totalItems?: number;
+ title?: string;
+ className?: string;
+}
+
+const RegistryDetails: React.FC = ({
+ items,
+ logoURI = "https://ipfs.kleros.io//ipfs/QmZPeWnzHGKwvnckQE2QrdRJiUFqQXvQEZGFHdEAh7raHN/fno.png",
+ title = "Address Tags",
+ description = "A list of public name tags, associated with Ethereum mainnet contract addresses.",
+ totalItems = 3,
+ className,
+}) => {
+ const theme = useTheme();
+ const historyItems = [
+ {
+ title: "List Submitted",
+ variant: theme.primaryBlue,
+ subtitle: "April 06, 2022",
+ rightSided: true,
+ },
+ {
+ title: "List Challenged",
+ party: "- Case #1369 by Alice.eth",
+ variant: theme.secondaryPurple,
+ subtitle: "April 07, 2022",
+ rightSided: true,
+ },
+ {
+ title: "List Submitted",
+ subtitle: "April 06, 2022",
+ rightSided: true,
+ Icon: ClosedIcon,
+ },
+ ];
+
+ return (
+
+
+
+
+ } />
+ } />
+ } />
+
+
+ );
+};
+
+export default RegistryDetails;
diff --git a/web/src/pages/AllLists/StyledBreadcrumb.tsx b/web/src/pages/AllLists/StyledBreadcrumb.tsx
new file mode 100644
index 0000000..a9a5915
--- /dev/null
+++ b/web/src/pages/AllLists/StyledBreadcrumb.tsx
@@ -0,0 +1,14 @@
+import styled from "styled-components";
+import { Breadcrumb as BreadcrumbBase } from "@kleros/ui-components-library";
+
+const StyledBreadcrumb = styled(BreadcrumbBase)`
+ margin-bottom: 32px;
+ align-items: center;
+`;
+
+interface IBreadcrumb {
+ items: { text: string | Element; value: string }[];
+}
+const Breadcrumb: React.FC = ({ items }) => ;
+
+export default Breadcrumb;
diff --git a/web/src/pages/AllLists/index.tsx b/web/src/pages/AllLists/index.tsx
index b411238..2fb9a34 100644
--- a/web/src/pages/AllLists/index.tsx
+++ b/web/src/pages/AllLists/index.tsx
@@ -4,7 +4,10 @@ import { Route, Routes } from "react-router-dom";
import { useAccount, useNetwork } from "wagmi";
import { DEFAULT_CHAIN } from "consts/chains";
import RegistriesFetcher from "./RegistriesFetcher";
-// import RegistryDetails from "./RegistryDetails";
+import RegistryDetails from "./RegistryDetails";
+import ItemDisplay from "./Item";
+import Breadcrumb from "./StyledBreadcrumb";
+import HomeIcon from "svgs/icons/home.svg";
const Container = styled.div`
width: 100%;
@@ -24,6 +27,19 @@ export const ConnectWalletContainer = styled.div`
color: ${({ theme }) => theme.primaryText};
`;
+const StyledHomeIcon = styled(HomeIcon)`
+ path {
+ fill: ${({ theme }) => theme.secondaryText};
+ }
+ margin-bottom: 3.5px;
+`;
+
+const breadcrumbItems = [
+ { text: , value: "0" },
+ { text: "All Lists", value: "1" },
+ { text: "Address Tags", value: "2" },
+];
+
const AllLists: React.FC = () => {
const { isConnected } = useAccount();
const { chain } = useNetwork();
@@ -31,9 +47,11 @@ const AllLists: React.FC = () => {
return (
+
} />
- {/* } /> */}
+ } />
+ } />
);
diff --git a/web/src/pages/Home/Highlights/index.tsx b/web/src/pages/Home/Highlights/index.tsx
index 51ba23e..779e95f 100644
--- a/web/src/pages/Home/Highlights/index.tsx
+++ b/web/src/pages/Home/Highlights/index.tsx
@@ -1,14 +1,13 @@
-import React, { useContext, useMemo } from "react";
+import React, { useMemo } from "react";
import styled from "styled-components";
import { BREAKPOINT_LANDSCAPE } from "styles/landscapeStyle";
import { useWindowSize } from "react-use";
-import { useNavigate } from "react-router-dom";
import { Button } from "@kleros/ui-components-library";
import { lists } from "consts/index";
import Header from "./Header";
import RegistryCard from "components/RegistryCard";
import { useIsList } from "context/IsListProvider";
-import { OverlayScrollContext } from "context/OverlayScrollContext";
+import { useNavigateAndScrollTop } from "hooks/useNavigateAndScrollTop";
const Container = styled.div`
width: 100%;
@@ -37,18 +36,6 @@ const StyledButton = styled(Button)`
margin: 0 auto;
`;
-const useNavigateAndScrollTop = () => {
- const navigate = useNavigate();
- const osInstanceRef = useContext(OverlayScrollContext);
-
- const navigateAndScrollTop = (path) => {
- navigate(path);
- osInstanceRef?.current?.osInstance().elements().viewport.scroll({ top: 0 });
- };
-
- return navigateAndScrollTop;
-};
-
const HighlightedLists: React.FC = () => {
const navigateAndScrollTop = useNavigateAndScrollTop();
const { isList } = useIsList();
diff --git a/web/src/pages/SubmitItem/Header/index.tsx b/web/src/pages/SubmitItem/Header/index.tsx
new file mode 100644
index 0000000..4df12e9
--- /dev/null
+++ b/web/src/pages/SubmitItem/Header/index.tsx
@@ -0,0 +1,115 @@
+import React from "react";
+import styled, { css } from "styled-components";
+import { landscapeStyle } from "styles/landscapeStyle";
+import { responsiveSize } from "styles/responsiveSize";
+import { Card } from "@kleros/ui-components-library";
+import GnosisIcon from "svgs/chains/gnosis.svg";
+import PileCoinsIcon from "svgs/icons/pile-coins.svg";
+
+const Container = styled.div`
+ display: flex;
+ justify-content: center;
+`;
+
+const StyledCard = styled(Card)`
+ display: flex;
+ margin-top: 60px;
+ margin-bottom: ${responsiveSize(36, 36)};
+ padding: 24px ${responsiveSize(24, 32)};
+ width: 80vw;
+ height: auto;
+ justify-content: space-between;
+ gap: 24px;
+ flex-wrap: wrap;
+
+ ${landscapeStyle(
+ () => css`
+ width: 91vw;
+ `
+ )}
+`;
+
+const LeftContent = styled.div`
+ display: flex;
+ gap: 8px;
+ flex-wrap: wrap;
+`;
+
+const Title = styled.p`
+ font-size: 24px;
+ font-weight: 600;
+ margin: 0;
+ color: ${({ theme }) => theme.primaryText};
+`;
+
+const ListName = styled.p`
+ font-size: 24px;
+ font-weight: 600;
+ margin: 0;
+ color: ${({ theme }) => theme.secondaryPurple};
+`;
+
+const RightContent = styled.div`
+ display: flex;
+ gap: 16px 48px;
+ align-items: center;
+ flex-wrap: wrap;
+`;
+
+const DepositRequired = styled.div`
+ display: flex;
+ flex-wrap: wrap;
+
+ svg {
+ fill: ${({ theme }) => theme.secondaryPurple};
+ margin-right: 8px;
+ width: 16px;
+ }
+`;
+
+const StyledP = styled.p`
+ margin: 0;
+ color: ${({ theme }) => theme.primaryText};
+`;
+
+const Amount = styled.p`
+ margin: 0;
+`;
+
+const Chain = styled.div`
+ display: flex;
+ flex-direction: row;
+
+ svg {
+ margin-right: 8px;
+ width: 24px;
+ }
+`;
+
+interface IHeader {}
+
+const Header: React.FC = ({}) => {
+ return (
+
+
+
+ Submit Item to
+ Address Tags List
+
+
+
+
+ Deposit required:
+ 0.003 ETH
+
+
+
+ Gnosis
+
+
+
+
+ );
+};
+
+export default Header;
diff --git a/web/src/pages/SubmitItem/ItemField/index.tsx b/web/src/pages/SubmitItem/ItemField/index.tsx
new file mode 100644
index 0000000..3910a19
--- /dev/null
+++ b/web/src/pages/SubmitItem/ItemField/index.tsx
@@ -0,0 +1,59 @@
+import React from "react";
+import styled, { css } from "styled-components";
+import { landscapeStyle } from "styles/landscapeStyle";
+import { responsiveSize } from "styles/responsiveSize";
+import { Field } from "@kleros/ui-components-library";
+import { useSubmitItemContext } from "context/SubmitItemContext";
+import Title from "../Title";
+import NavigationButtons from "../NavigationButtons";
+
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+`;
+
+const StyledField = styled(Field)`
+ width: 80vw;
+ margin-bottom: ${responsiveSize(68, 40)};
+
+ input {
+ font-size: 16px;
+ }
+
+ small {
+ margin-top: 6px;
+ svg {
+ margin-top: 8px;
+ }
+ }
+
+ ${landscapeStyle(
+ () => css`
+ width: ${responsiveSize(200, 720)};
+ `
+ )};
+`;
+
+const ItemField: React.FC = () => {
+ const { fieldOne, setFieldOne } = useSubmitItemContext();
+
+ const handleWrite = (event: React.ChangeEvent) => {
+ setFieldOne(event.target.value);
+ };
+
+ return (
+
+
+
+
+
+ );
+};
+
+export default ItemField;
diff --git a/web/src/pages/SubmitItem/NavigationButtons/NextButton.tsx b/web/src/pages/SubmitItem/NavigationButtons/NextButton.tsx
new file mode 100644
index 0000000..9696c9d
--- /dev/null
+++ b/web/src/pages/SubmitItem/NavigationButtons/NextButton.tsx
@@ -0,0 +1,22 @@
+import React from "react";
+import { Button } from "@kleros/ui-components-library";
+import { useLocation, useNavigate } from "react-router-dom";
+import { useSubmitItemContext } from "context/SubmitItemContext";
+
+interface INextButton {
+ nextRoute: string;
+}
+
+const NextButton: React.FC = ({ nextRoute }) => {
+ const navigate = useNavigate();
+ const { fieldOne, isPolicyRead } = useSubmitItemContext();
+ const location = useLocation();
+
+ const isButtonDisabled =
+ (location.pathname.includes("/submitItem/itemField1") && !fieldOne) ||
+ (location.pathname.includes("/submitItem/policy") && !isPolicyRead);
+
+ return