Path: blob/master/src/packages/frontend/account/account-preferences-security.tsx
2209 views
/*1* This file is part of CoCalc: Copyright © 2025 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { useTypedRedux } from "@cocalc/frontend/app-framework";67import { KUCALC_COCALC_COM } from "@cocalc/util/db-schema/site-defaults";8import ApiKeys from "./settings/api-keys";9import GlobalSSHKeys from "./ssh-keys/global-ssh-keys";1011import type { IconName } from "@cocalc/frontend/components/icon";1213// Icon constant for account preferences section14export const KEYS_ICON_NAME: IconName = "key";1516export function AccountPreferencesSecurity() {17const is_anonymous = useTypedRedux("account", "is_anonymous");18const kucalc = useTypedRedux("customize", "kucalc");19const ssh_gateway = useTypedRedux("customize", "ssh_gateway");2021return (22<>23{(ssh_gateway || kucalc === KUCALC_COCALC_COM) && <GlobalSSHKeys />}24{!is_anonymous && <ApiKeys />}25</>26);27}282930