Skip to content

Commit

Permalink
Address linting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathewjordan committed Jun 17, 2024
1 parent 7ac9895 commit a10af13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const Search: React.FC<SearchProps> = ({ isSearchActive }) => {
});

searchDispatch({
type: "updateActiveTab",
activeTab: ai ? "stream" : "results",
type: "updateActiveTab",
});

router.push({
Expand Down
6 changes: 3 additions & 3 deletions pages/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ const SearchPage: NextPage = () => {

function handleResultsTab() {
if (window.scrollY === 0) {
searchDispatch({ type: "updateActiveTab", activeTab: "results" });
searchDispatch({ activeTab: "results", type: "updateActiveTab" });
return;
}

window.scrollTo({ behavior: "instant", top: 0 });

const checkScroll = () => {
if (window.scrollY === 0) {
searchDispatch({ type: "updateActiveTab", activeTab: "results" });
searchDispatch({ activeTab: "results", type: "updateActiveTab" });
window.removeEventListener("scroll", checkScroll);
}
};
Expand Down Expand Up @@ -260,8 +260,8 @@ const SearchPage: NextPage = () => {
value={activeTab}
onValueChange={(value) =>
searchDispatch({
type: "updateActiveTab",
activeTab: value as ActiveTab,
type: "updateActiveTab",
})
}
>
Expand Down

0 comments on commit a10af13

Please sign in to comment.