Files
outline/app/menus/OAuthAuthenticationMenu.tsx
T
Tom MoorandClaude 8192bc0514 chore: Audit and move inline actions to definitions (#13133)
* 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>
2026-07-25 16:13:12 +00:00

33 lines
1.1 KiB
TypeScript

import { observer } from "mobx-react";
import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import type OAuthAuthentication from "~/models/oauth/OAuthAuthentication";
import { DropdownMenu } from "~/components/Menu/DropdownMenu";
import { OverflowMenuButton } from "~/components/Menu/OverflowMenuButton";
import { revokeOAuthAuthenticationActionFactory } from "~/actions/definitions/oauthAuthentications";
import { useMenuAction } from "~/hooks/useMenuAction";
type Props = {
/** The OAuthAuthentication to associate with the menu */
oauthAuthentication: OAuthAuthentication;
};
function OAuthAuthenticationMenu({ oauthAuthentication }: Props) {
const { t } = useTranslation();
const actions = useMemo(
() => [revokeOAuthAuthenticationActionFactory({ oauthAuthentication })],
[oauthAuthentication]
);
const rootAction = useMenuAction(actions);
return (
<DropdownMenu action={rootAction} ariaLabel={t("Show menu")}>
<OverflowMenuButton />
</DropdownMenu>
);
}
export default observer(OAuthAuthenticationMenu);