Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/account/account-preferences-profile.tsx
2209 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 type { IconName } from "@cocalc/frontend/components/icon";
7
8
import { useTypedRedux } from "@cocalc/frontend/app-framework";
9
10
import { ProfileSettings } from "./profile-settings";
11
import { AccountSettings } from "./settings/account-settings";
12
13
// Icon constant for account preferences section
14
export const ACCOUNT_PROFILE_ICON_NAME: IconName = "address-card";
15
16
export const ACCOUNT_PREFERENCES_ICON_NAME: IconName = "cogs";
17
18
export function AccountPreferencesProfile() {
19
const account_id = useTypedRedux("account", "account_id");
20
const first_name = useTypedRedux("account", "first_name");
21
const last_name = useTypedRedux("account", "last_name");
22
const name = useTypedRedux("account", "name");
23
const email_address = useTypedRedux("account", "email_address");
24
const email_address_verified = useTypedRedux(
25
"account",
26
"email_address_verified",
27
);
28
const passports = useTypedRedux("account", "passports");
29
const sign_out_error = useTypedRedux("account", "sign_out_error");
30
const other_settings = useTypedRedux("account", "other_settings");
31
const is_anonymous = useTypedRedux("account", "is_anonymous");
32
const created = useTypedRedux("account", "created");
33
const strategies = useTypedRedux("account", "strategies");
34
const unlisted = useTypedRedux("account", "unlisted");
35
const email_enabled = useTypedRedux("customize", "email_enabled");
36
const verify_emails = useTypedRedux("customize", "verify_emails");
37
38
return (
39
<>
40
<AccountSettings
41
account_id={account_id}
42
first_name={first_name}
43
last_name={last_name}
44
name={name}
45
email_address={email_address}
46
email_address_verified={email_address_verified}
47
passports={passports}
48
sign_out_error={sign_out_error}
49
other_settings={other_settings}
50
is_anonymous={is_anonymous}
51
email_enabled={email_enabled}
52
verify_emails={verify_emails}
53
created={created}
54
strategies={strategies}
55
unlisted={unlisted}
56
/>
57
<ProfileSettings email_address={email_address} />
58
</>
59
);
60
}
61
62