From 9d770e63b2181c2d9af7cea1660ebb2d4c260ed6 Mon Sep 17 00:00:00 2001 From: Rinat Date: Mon, 28 Oct 2024 14:25:18 +0100 Subject: [PATCH] fix: localStorage -> sessionStorage --- packages/nextjs/app/debug/_components/DebugContracts.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/app/debug/_components/DebugContracts.tsx b/packages/nextjs/app/debug/_components/DebugContracts.tsx index 2188a6f0b..775f456ad 100644 --- a/packages/nextjs/app/debug/_components/DebugContracts.tsx +++ b/packages/nextjs/app/debug/_components/DebugContracts.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect, useMemo } from "react"; -import { useLocalStorage } from "usehooks-ts"; +import { useSessionStorage } from "usehooks-ts"; import { BarsArrowUpIcon } from "@heroicons/react/20/solid"; import { ContractUI } from "~~/app/debug/_components/contract"; import { ContractName, GenericContract } from "~~/utils/scaffold-eth/contract"; @@ -13,7 +13,7 @@ export function DebugContracts() { const contractsData = useAllContracts(); const contractNames = useMemo(() => Object.keys(contractsData) as ContractName[], [contractsData]); - const [selectedContract, setSelectedContract] = useLocalStorage( + const [selectedContract, setSelectedContract] = useSessionStorage( selectedContractStorageKey, contractNames[0], { initializeWithValue: false },