Fix reload compliance page on request all callback

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-03-05 10:29:37 +04:00
parent 992af8adbc
commit 3e52a0b7f0

View File

@@ -6,6 +6,8 @@ import { useMutation } from "react-relay";
import { useLocation, useSearchParams } from "react-router";
import { graphql } from "relay-runtime";
import { getPathPrefix } from "#/utils/pathPrefix";
import type { useRequestAccessCallback_allMutation } from "./__generated__/useRequestAccessCallback_allMutation.graphql";
import type { useRequestAccessCallback_documentMutation } from "./__generated__/useRequestAccessCallback_documentMutation.graphql";
import type { useRequestAccessCallback_fileMutation } from "./__generated__/useRequestAccessCallback_fileMutation.graphql";
@@ -170,7 +172,7 @@ export function useRequestAccessCallback() {
}
toast(successToastArgs(__));
window.location.href = location.pathname;
window.location.href = (getPathPrefix() || "/") + location.pathname;
},
onError: (error) => {
toast(errorToastArgs(__, error));