Skip to content

Commit 779cf52

Browse files
author
sopisoft
committed
fix input
1 parent 357a405 commit 779cf52

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/popup/components/inputs.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ function Inputs() {
7979
});
8080
}
8181

82-
useEffect(() => {
83-
const last_id = window.localStorage.getItem("videoId");
84-
setVideoId(last_id ?? "");
85-
}, [setVideoId]);
86-
8782
return (
8883
<>
8984
<TooltipProvider delayDuration={200}>

src/popup/components/search.tsx src/popup/components/search_input.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function Search() {
9090
placeholder="検索ワード"
9191
className="col-span-5"
9292
type="text"
93-
value={word}
93+
defaultValue={word}
9494
onChange={(e) => {
9595
setWord(e.target.value);
9696
}}

src/popup/popup.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { createRoot } from "react-dom/client";
2525
import browser from "webextension-polyfill";
2626
import Inputs from "./components/inputs";
2727
import Menu from "./components/menu";
28-
import Search from "./components/search";
28+
import Search from "./components/search_input";
2929
import { isWatchPage as isWatchPageFn } from "./utils";
3030

3131
export const VideoIdContext = createContext<{
@@ -42,7 +42,6 @@ export const Popup = () => {
4242

4343
function setVideoId(video_id: string) {
4444
_setVideoId(video_id);
45-
window.localStorage.setItem("videoId", video_id);
4645
}
4746

4847
isWatchPageFn().then(setIsWatchPage);

0 commit comments

Comments
 (0)