diff --git a/ui2/src/components/SearchResults/ActionButtons.tsx b/ui2/src/components/SearchResults/ActionButtons.tsx index 3aca5a415..c103c5ada 100644 --- a/ui2/src/components/SearchResults/ActionButtons.tsx +++ b/ui2/src/components/SearchResults/ActionButtons.tsx @@ -1,10 +1,13 @@ import {Group} from "@mantine/core" import ToggleSecondaryPanel from "@/components/DualPanel/ToggleSecondaryPanel" +import GoBackButton from "./GoBackButton" export default function ActionButtons() { return ( - Some button here + + + diff --git a/ui2/src/components/SearchResults/GoBackButton.tsx b/ui2/src/components/SearchResults/GoBackButton.tsx new file mode 100644 index 000000000..c95bb0cc1 --- /dev/null +++ b/ui2/src/components/SearchResults/GoBackButton.tsx @@ -0,0 +1,22 @@ +import {Tooltip, ActionIcon} from "@mantine/core" +import {IconArrowLeft} from "@tabler/icons-react" +import {useNavigate} from "react-router-dom" +import {selectCurrentUser} from "@/slices/currentUser" +import {useSelector} from "react-redux" + +export default function GoBackButton() { + const user = useSelector(selectCurrentUser) as User + const navigate = useNavigate() + + const onClick = () => { + navigate(`/home/${user.home_folder_id}`) + } + + return ( + + + + + + ) +}