mirror of
https://github.com/outline/outline.git
synced 2026-12-03 18:10:36 +03:00
* chore: Audit and move inline actions to definitions * fix: Reuse existing smart-quote translation key in emoji delete dialog Co-Authored-By: Claude <noreply@anthropic.com> * Remove two usages of 'Link copied' translation --------- Co-authored-by: Claude <noreply@anthropic.com>
32 lines
761 B
TypeScript
32 lines
761 B
TypeScript
import { useTranslation } from "react-i18next";
|
|
import type OAuthAuthentication from "~/models/oauth/OAuthAuthentication";
|
|
import ConfirmationDialog from "~/components/ConfirmationDialog";
|
|
|
|
type Props = {
|
|
oauthAuthentication: OAuthAuthentication;
|
|
onSubmit: () => void;
|
|
};
|
|
|
|
export default function OAuthAuthenticationRevokeDialog({
|
|
oauthAuthentication,
|
|
onSubmit,
|
|
}: Props) {
|
|
const { t } = useTranslation();
|
|
|
|
const handleSubmit = async () => {
|
|
await oauthAuthentication.deleteAll();
|
|
onSubmit();
|
|
};
|
|
|
|
return (
|
|
<ConfirmationDialog
|
|
onSubmit={handleSubmit}
|
|
submitText={t("Revoke")}
|
|
savingText={`${t("Revoking")}…`}
|
|
danger
|
|
>
|
|
{t("Are you sure you want to revoke access?")}
|
|
</ConfirmationDialog>
|
|
);
|
|
}
|