diff --git a/web/app/components/RootSection.tsx b/web/app/components/RootSection.tsx index b714cb1..602d138 100644 --- a/web/app/components/RootSection.tsx +++ b/web/app/components/RootSection.tsx @@ -1,6 +1,7 @@ import { useLocation } from "@remix-run/react"; import { Section } from "napi-pallas"; import { useState } from "react"; +import { EraType } from "../interfaces"; import { SearchParams, getTopicMeta } from "../utils"; import { HexBlock, PropBlock, TopicMeta } from "./constructors"; import { DataSection, ValidationInformation } from "./index"; @@ -8,13 +9,13 @@ import { DataSection, ValidationInformation } from "./index"; export function RootSection(props: { data: Section; topics: Record; - era: string; + era: EraType; }) { const location = useLocation(); const searchParams = new URLSearchParams(location.search); const initialOpen = searchParams.get(SearchParams.OPEN) === "true"; const goesBeginning = searchParams.get(SearchParams.BEGINNING) === "true"; - const [open, setOpen] = useState(undefined); + const [open, setOpen] = useState(initialOpen); const handleClick = () => setOpen(!open); const topic = getTopicMeta(props.data.topic, props.topics); diff --git a/web/app/components/Validations/Configurations/ContextTab.tsx b/web/app/components/Validations/Configurations/ContextTab.tsx index c540bff..204106d 100644 --- a/web/app/components/Validations/Configurations/ContextTab.tsx +++ b/web/app/components/Validations/Configurations/ContextTab.tsx @@ -44,32 +44,6 @@ export const ContextTab = () => { }; return (
-
Protocol Parameters
-
- {paramsList.map((param, index) => ( -
- - -
- ))} -
-
Select a Network
{/* To get the network from the form*/} @@ -121,16 +95,43 @@ export const ContextTab = () => {

-
Select a Block Slot
+
Select a Block Slot
+ +
+
Protocol Parameters
+
+ {paramsList.map((param, index) => ( +
+ + +
+ ))} +
); }; diff --git a/web/app/components/Validations/Configurations/UITab.tsx b/web/app/components/Validations/Configurations/UITab.tsx index 8e33893..3cb8ebc 100644 --- a/web/app/components/Validations/Configurations/UITab.tsx +++ b/web/app/components/Validations/Configurations/UITab.tsx @@ -13,7 +13,7 @@ export const UITab = () => { const changeValidations = (validation: string) => (event: React.ChangeEvent) => { - const isChecked = event.target.checked; + const isChecked = !event.target.checked; const newSearchParams = new URLSearchParams(location.search); const currentValues = newSearchParams.get(SearchParams.LIST)?.split(",") ?? []; @@ -33,7 +33,7 @@ export const UITab = () => { }; const changeQuery = - (q: string) => (e: React.ChangeEvent) => { + (q: SearchParams) => (e: React.ChangeEvent) => { const isChecked = e.target.checked; const newSearchParams = new URLSearchParams(location.search); @@ -61,22 +61,22 @@ export const UITab = () => { border-2 border-black rounded-b-full border-b-4 px-6 shadow-black shadow-small transition-all duration-400 ease-in-out ${ shownValidations.includes(validation.name) - ? "bg-red-200 " - : "bg-green-200 " + ? "bg-green-200 " + : "bg-red-200 " }`} > @@ -93,25 +93,49 @@ export const UITab = () => { - +
+
+ +
+
- +
+
+ +
+