diff --git a/src/App.tsx b/src/App.tsx index 71ffb23..72a9d43 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -16,11 +16,6 @@ function App() { initializeSubject(); const [searchOptions, setSearchOptions] = useState(initialSearchOptions); - const [actualSearchOptions, setActualSearchOptions] = useState(initialSearchOptions); - - const handleSearch = (newSearchOptions: SearchOptions) => { - setActualSearchOptions(newSearchOptions); - }; // テーマのステートを追加 (デフォルトはシステムの設定に依存) const [theme, setTheme] = useState(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); @@ -67,9 +62,9 @@ function App() { - + - + diff --git a/src/components/SearchComponent/SearchComponent.tsx b/src/components/SearchComponent/SearchComponent.tsx index 6ee1925..4c19055 100644 --- a/src/components/SearchComponent/SearchComponent.tsx +++ b/src/components/SearchComponent/SearchComponent.tsx @@ -8,15 +8,10 @@ import { kaikouBukyokus, kaikouBukyokuGakubus, kaikouBukyokuDaigakuins } from '. type SearchComponentProps = { setSearchOptions: React.Dispatch>; searchOptions: SearchOptions; - onSearch: (newSearchOptions: SearchOptions) => void; }; // TODO: あいまい検索に対応(generalSearch) -const SearchComponent: React.FC = ({ searchOptions, onSearch, setSearchOptions }: SearchComponentProps) => { - const handleSearch = () => { - onSearch(searchOptions); - }; - +const SearchComponent: React.FC = ({ searchOptions, setSearchOptions }: SearchComponentProps) => { const handleClear = () => { setSearchOptions(initialSearchOptions); }; @@ -238,7 +233,6 @@ const SearchComponent: React.FC = ({ searchOptions, onSear
-