Skip to content

Commit

Permalink
Merge pull request #149 from scaffold-eth/backmerge-11-4-24
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 authored Nov 4, 2024
2 parents 9b8a22e + a49cd6d commit 57450f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-students-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-eth": patch
---

fix: localStorage -> sessionStorage in debug contracts page (https://github.com/scaffold-eth/scaffold-eth-2/pull/975)
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 57450f7

Please sign in to comment.