diff --git a/.githooks/pre-commit b/.githooks/pre-commit index f5008c586..ef67eaa37 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,2 +1,6 @@ +#!/bin/sh -make format \ No newline at end of file +added_files=$(git diff --name-only --cached --diff-filter=d) + +make format +git add ${added_files} \ No newline at end of file diff --git a/src/frontend/src/components/ExtraSidebarComponent/index.tsx b/src/frontend/src/components/ExtraSidebarComponent/index.tsx index f5acd5a23..b06a58d9c 100644 --- a/src/frontend/src/components/ExtraSidebarComponent/index.tsx +++ b/src/frontend/src/components/ExtraSidebarComponent/index.tsx @@ -1,6 +1,6 @@ import { Disclosure } from "@headlessui/react"; import { ChevronLeftIcon } from "@heroicons/react/24/outline"; -import { useContext } from "react"; +import { useContext, useState } from "react"; import { Link } from "react-router-dom"; import { classNames } from "../../utils"; import { locationContext } from "../../contexts/locationContext"; @@ -13,6 +13,7 @@ export default function ExtraSidebar() { extraNavigation, extraComponent, } = useContext(locationContext); + return ( <>