Persist sort priority!

This commit is contained in:
Gregory Schier
2023-03-19 00:48:09 -07:00
parent d9b38efd97
commit c4ab045e57
17 changed files with 457 additions and 243 deletions

View File

@@ -7,7 +7,8 @@ import { useActiveWorkspace } from './useActiveWorkspace';
export function useCreateRequest({ navigateAfter }: { navigateAfter: boolean }) {
const workspace = useActiveWorkspace();
const navigate = useNavigate();
return useMutation<string, unknown, Pick<HttpRequest, 'name'>>({
return useMutation<string, unknown, Pick<HttpRequest, 'name' | 'sortPriority'>>({
mutationFn: (patch) => {
if (workspace === null) {
throw new Error("Cannot create request when there's no active workspace");