Skip to content

Commit

Permalink
fix: inconsistency between toasts for signing out
Browse files Browse the repository at this point in the history
  • Loading branch information
Gobot1234 committed May 30, 2024
1 parent 5862dab commit 33f3542
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion apps/forge/src/components/ucard-reader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ export default function UCardReader() {
},
success: () => {
queryClient.invalidateQueries({ queryKey: ["locationStatus", "locationList", { activeLocation }] });
return `Successfully signed out ${uCardNumber}`;
return (
<>
Successfully signed out{" "}
<a className="font-bold hover:underline hover:cursor-pointer" href={`/users/${matchingUser.id}`}>
{matchingUser.display_name}
</a>
</>
);
},
});
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ export const SignedInUserCard: React.FunctionComponent<SignInUserCardProps> = ({
},
onSuccess: () => {
abortController.abort();
toast.success(`Successfully signed out ${user.display_name}`);
toast.success(
<>
Successfully signed out{" "}
<a className="font-bold hover:underline hover:cursor-pointer" href={`/users/${user.id}`}>
{user.display_name}
</a>
</>,
);
onSignOut?.();
queryClient.invalidateQueries({ queryKey: ["locationStatus", "locationList", { activeLocation }] });
},
Expand Down

0 comments on commit 33f3542

Please sign in to comment.