import { signInPath } from "~/utils/auth"; /** Send a signed-out shopper to sign in and back to the page they were on. */ export function useSignInRedirect() { const route = useRoute(); const router = useRouter(); return async function signInThenReturn(): Promise { await router.push(signInPath(route.fullPath)); }; }