Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/account/account-preferences.tsx
6046 views
1
/*
2
* This file is part of CoCalc: Copyright © 2025 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { useTypedRedux } from "@cocalc/frontend/app-framework";
7
8
import { AccountSettings } from "./settings/account-settings";
9
import TableError from "./table-error";
10
11
// Legacy component for backward compatibility - now just renders account settings
12
export const AccountPreferences: React.FC = () => {
13
const account_id = useTypedRedux("account", "account_id");
14
const first_name = useTypedRedux("account", "first_name");
15
const last_name = useTypedRedux("account", "last_name");
16
const name = useTypedRedux("account", "name");
17
const email_address = useTypedRedux("account", "email_address");
18
const email_address_verified = useTypedRedux(
19
"account",
20
"email_address_verified",
21
);
22
const passports = useTypedRedux("account", "passports");
23
const sign_out_error = useTypedRedux("account", "sign_out_error");
24
const other_settings = useTypedRedux("account", "other_settings");
25
const is_anonymous = useTypedRedux("account", "is_anonymous");
26
const created = useTypedRedux("account", "created");
27
const strategies = useTypedRedux("account", "strategies");
28
const unlisted = useTypedRedux("account", "unlisted");
29
const email_enabled = useTypedRedux("customize", "email_enabled");
30
const verify_emails = useTypedRedux("customize", "verify_emails");
31
32
return (
33
<div>
34
<TableError />
35
<AccountSettings
36
account_id={account_id}
37
first_name={first_name}
38
last_name={last_name}
39
name={name}
40
email_address={email_address}
41
email_address_verified={email_address_verified}
42
passports={passports}
43
sign_out_error={sign_out_error}
44
other_settings={other_settings}
45
is_anonymous={is_anonymous}
46
email_enabled={email_enabled}
47
verify_emails={verify_emails}
48
created={created}
49
strategies={strategies}
50
unlisted={unlisted}
51
/>
52
</div>
53
);
54
};
55
56