Skip to content

Commit

Permalink
fix: localStorage -> sessionStorage in debug contracts page(#975)
Browse files Browse the repository at this point in the history
  • Loading branch information
rin-st authored Oct 29, 2024
1 parent f7b15bf commit 4fad12a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nextjs/app/debug/_components/DebugContracts.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -13,7 +13,7 @@ export function DebugContracts() {
const contractsData = useAllContracts();
const contractNames = useMemo(() => Object.keys(contractsData) as ContractName[], [contractsData]);

const [selectedContract, setSelectedContract] = useLocalStorage<ContractName>(
const [selectedContract, setSelectedContract] = useSessionStorage<ContractName>(
selectedContractStorageKey,
contractNames[0],
{ initializeWithValue: false },
Expand Down

0 comments on commit 4fad12a

Please sign in to comment.