Skip to content

Commit

Permalink
fix input (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
sopisoft authored Apr 27, 2024
1 parent 357a405 commit 7a326a3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/popup/components/inputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ function Inputs() {
});
}

useEffect(() => {
const last_id = window.localStorage.getItem("videoId");
setVideoId(last_id ?? "");
}, [setVideoId]);

return (
<>
<TooltipProvider delayDuration={200}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function Search() {
placeholder="検索ワード"
className="col-span-5"
type="text"
value={word}
defaultValue={word}
onChange={(e) => {
setWord(e.target.value);
}}
Expand Down
3 changes: 1 addition & 2 deletions src/popup/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { createRoot } from "react-dom/client";
import browser from "webextension-polyfill";
import Inputs from "./components/inputs";
import Menu from "./components/menu";
import Search from "./components/search";
import Search from "./components/search_input";
import { isWatchPage as isWatchPageFn } from "./utils";

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

function setVideoId(video_id: string) {
_setVideoId(video_id);
window.localStorage.setItem("videoId", video_id);
}

isWatchPageFn().then(setIsWatchPage);
Expand Down

0 comments on commit 7a326a3

Please sign in to comment.