umami/components/settings/ProfileDetails.js
Mike Cao db6a6d6055 Merge branch 'dev' of https://github.com/umami-software/umami into dev
# Conflicts:
#	components/forms/UserPasswordForm.js
#	components/pages/Dashboard.js
2022-12-28 15:49:28 -08:00

54 lines
1.3 KiB
JavaScript

import TimezoneSetting from 'components/settings/TimezoneSetting';
import useUser from 'hooks/useUser';
import { FormattedMessage } from 'react-intl';
import DateRangeSetting from './DateRangeSetting';
import LanguageSetting from './LanguageSetting';
import styles from './ProfileDetails.module.css';
import ThemeSetting from './ThemeSetting';
export default function ProfileDetails() {
const user = useUser();
if (!user) {
return null;
}
const { username } = user;
return (
<>
<dl className={styles.list}>
<dt>
<FormattedMessage id="label.username" defaultMessage="Username" />
</dt>
<dd>{username}</dd>
<dt>
<FormattedMessage id="label.timezone" defaultMessage="Timezone" />
</dt>
<dd>
<TimezoneSetting />
</dd>
<dt>
<FormattedMessage id="label.default-date-range" defaultMessage="Default date range" />
</dt>
<dd>
<DateRangeSetting />
</dd>
<dt>
<FormattedMessage id="label.language" defaultMessage="Language" />
</dt>
<dd>
<LanguageSetting />
</dd>
<dt>
<FormattedMessage id="label.theme" defaultMessage="Theme" />
</dt>
<dd>
<ThemeSetting />
</dd>
</dl>
</>
);
}