Rename frontend directory (#472)

* Rename directory

* Cleanup

* Recover lost images

* remove lint
This commit is contained in:
Andrey Pokhilko
2023-09-26 10:04:44 +01:00
committed by GitHub
parent 133eef6745
commit dd7aca70ff
146 changed files with 595 additions and 309 deletions

View File

@@ -0,0 +1,24 @@
import { NavLink, useLocation } from "react-router-dom";
const LinkWithSearchParams = ({
to,
...props
}: {
to: string;
end?: boolean;
exclude?: string[];
className?: string;
children: React.ReactNode;
}) => {
const { search } = useLocation();
const params = new URLSearchParams(search);
// For state we don't want to keep while navigating
props.exclude?.forEach((key) => {
params.delete(key);
});
return <NavLink to={`${to}/?${params.toString()}`} {...props} />;
};
export default LinkWithSearchParams;