Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/api/workspace/org.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ export const saveSelectedWorkspace = async (orgId: number): Promise<void> => {
await axiosInstance.post(`/api/org/${orgId}/workspace`);
};

export const acceptInvitaton = async (
export const acceptInvitation = async (
token: string,
): Promise<TAcceptInvitationResponse> => {
const { data } = await axiosInstance.post<
ICommonResponse<TAcceptInvitationResponse>
>(`/api/org/invitations/${token}`);
>(`/api/org/invitations/${encodeURIComponent(token)}`);
return data.data;
};

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/auth/useDeleteMyAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { toast } from "sonner";

import type { IApiErrorResponse } from "@/types/common/common";

import { useCoreMutation } from "../customQuery";
import { useCoreMutation } from "@/hooks/customQuery";

import { deleteMyAccount } from "@/api/auth/auth";
import useAuthStore from "@/store/useAuthStore";
Expand Down
10 changes: 7 additions & 3 deletions src/pages/workspace/InviteAcceptPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useCoreMutation } from "@/hooks/customQuery";
import Button from "@/components/common/button/Button";
import ErrorLayout from "@/components/common/error/ErrorLayout";

import { acceptInvitaton, saveSelectedWorkspace } from "@/api/workspace/org";
import { acceptInvitation, saveSelectedWorkspace } from "@/api/workspace/org";
import { QUERY_KEYS } from "@/lib/queryKeys";
import useAuthStore from "@/store/useAuthStore";
import useWorkspaceStore from "@/store/useWorkspaceStore";
Expand Down Expand Up @@ -92,7 +92,7 @@ export default function InviteAcceptPage() {
const [countdown, setCountdown] = useState(LOGIN_REDIRECT_SECONDS);
const processedRef = useRef<string | null>(null);

const { mutate: acceptInvite } = useCoreMutation(acceptInvitaton, {
const { mutate: acceptInvite } = useCoreMutation(acceptInvitation, {
invalidateKeys: [QUERY_KEYS.workspace.list()],
userOnSuccess: async (data: TAcceptInvitationResponse) => {
try {
Expand Down Expand Up @@ -203,7 +203,11 @@ export default function InviteAcceptPage() {
className="h-12 w-12 animate-spin rounded-full border-4 border-primary-400 border-t-transparent"
aria-hidden
/>
<p className="text-center font-heading3 text-text-title">
<p
role="status"
aria-live="polite"
className="text-center font-heading3 text-text-title"
>
로그인이 필요합니다
</p>
<p className="text-center font-body1 text-text-muted">
Expand Down
Loading