add feedback form

This commit is contained in:
Paul Miller
2023-06-19 14:31:53 -05:00
parent f5b5fd8307
commit edbdfcedc2
12 changed files with 395 additions and 32 deletions

View File

@@ -0,0 +1,23 @@
import { useLocation, useNavigate } from "solid-start";
import { BackButton } from "./BackButton";
type StateWithPrevious = {
previous?: string;
};
export function BackPop() {
const navigate = useNavigate();
const location = useLocation();
const state = location.state as StateWithPrevious;
const backPath = () => (state?.previous ? state?.previous : "/");
return (
<BackButton
title="Back"
onClick={() => navigate(backPath())}
showOnDesktop
/>
);
}