added dashboard + sorting functionality done partially

This commit is contained in:
Daniel
2023-05-14 19:11:08 +03:30
parent d5c9e7aaf3
commit 9010627997
14 changed files with 518 additions and 61 deletions
+5 -1
View File
@@ -1,6 +1,6 @@
import { faMagnifyingGlass } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useState } from "react";
import { useEffect, useState } from "react";
import ClickAwayHandler from "./ClickAwayHandler";
import useSearchSettingsStore from "@/store/search";
import { useRouter } from "next/router";
@@ -15,6 +15,10 @@ export default function Search() {
const { searchSettings, toggleCheckbox, setSearchQuery } =
useSearchSettingsStore();
useEffect(() => {
if (router.pathname !== "/search") setSearchQuery("");
}, [router]);
return (
<ClickAwayHandler onClickOutside={() => setSearchBox(false)}>
<div