diff --git a/src/app/os/bin/page.tsx b/src/app/os/bin/page.tsx index 3921766..10fc750 100644 --- a/src/app/os/bin/page.tsx +++ b/src/app/os/bin/page.tsx @@ -44,10 +44,22 @@ export default function BinaryDetail() { const [xml, setXML] = useState(""); const [xmlKeys, setXMLKeys] = useState>(new Set()); const [history, setHistory] = useState([]); - const [compareWith, setCompareWith] = useState(null); const [compareXml, setCompareXml] = useState(""); const [compareLoading, setCompareLoading] = useState(false); + // Read compareWith from URL + const compareWith = params.get("diff"); + + const setCompareWith = (value: string | null) => { + const newParams = new URLSearchParams(params.toString()); + if (value) { + newParams.set("diff", value); + } else { + newParams.delete("diff"); + } + router.replace(`/os/bin?${newParams.toString()}`, { scroll: false }); + }; + useEffect(() => { setMounted(true); }, []); @@ -220,16 +232,9 @@ export default function BinaryDetail() { {/* Main content */}
-
-
-

Entitlements

-

- - {path} - -

-
-
+

+ {path} +

{loading && (