* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { LargeCenteredLayout, PageContentFontWrapper, TopBar } from 'design-system';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
import { Outlet } from 'react-router-dom';
const title = translate('my_account.page');
return (
<div id="account-page">
- <Suggestions suggestions="account" />
- <Helmet
- defaultTitle={title}
- defer={false}
- titleTemplate={translateWithParameters(
- 'page_title.template.with_category',
- translate('my_account.page'),
- )}
- />
- <A11ySkipTarget anchor="account_main" />
- <header className="account-header">
- <div className="account-container clearfix">
- <UserCard user={currentUser} />
+ <header>
+ <TopBar>
+ <div className="sw-flex sw-items-center sw-gap-2 sw-pb-4">
+ <UserCard user={currentUser} />
+ </div>
<Nav />
- </div>
+ </TopBar>
</header>
- <main>
- <Outlet />
- </main>
+ <LargeCenteredLayout as="main">
+ <PageContentFontWrapper className="sw-body-sm sw-py-8">
+ <Suggestions suggestions="account" />
+ <Helmet
+ defaultTitle={title}
+ defer={false}
+ titleTemplate={translateWithParameters(
+ 'page_title.template.with_category',
+ translate('my_account.page'),
+ )}
+ />
+ <A11ySkipTarget anchor="account_main" />
+ <Outlet />
+ </PageContentFontWrapper>
+ </LargeCenteredLayout>
</div>
);
}
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { NavBarTabLink, NavBarTabs } from 'design-system';
import * as React from 'react';
-import { NavLink } from 'react-router-dom';
-import NavBarTabs from '../../../components/ui/NavBarTabs';
import { translate } from '../../../helpers/l10n';
export default function Nav() {
return (
- <nav className="account-nav">
- <NavBarTabs>
- <li>
- <NavLink end to="/account">
- {translate('my_account.profile')}
- </NavLink>
- </li>
- <li>
- <NavLink to="/account/security">{translate('my_account.security')}</NavLink>
- </li>
- <li>
- <NavLink to="/account/notifications">{translate('my_account.notifications')}</NavLink>
- </li>
- <li>
- <NavLink to="/account/projects">{translate('my_account.projects')}</NavLink>
- </li>
- </NavBarTabs>
- </nav>
+ <NavBarTabs className="it__account-nav">
+ <NavBarTabLink end to="/account" text={translate('my_account.profile')} />
+ <NavBarTabLink to="/account/security" text={translate('my_account.security')} />
+ <NavBarTabLink to="/account/notifications" text={translate('my_account.notifications')} />
+ <NavBarTabLink to="/account/projects" text={translate('my_account.projects')} />
+ </NavBarTabs>
);
}
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { Avatar } from 'design-system';
import * as React from 'react';
-import LegacyAvatar from '../../../components/ui/LegacyAvatar';
import { LoggedInUser } from '../../../types/users';
interface Props {
export default function UserCard({ user }: Props) {
return (
- <div className="account-user">
- <div className="pull-left account-user-avatar" id="avatar">
- <LegacyAvatar hash={user.avatar} name={user.name} size={60} />
- </div>
- <h1 className="pull-left" id="name">
- {user.name}
- </h1>
- </div>
+ <>
+ <Avatar hash={user.avatar} name={user.name} size="md" />
+ <span className="sw-heading-md fs-mask">{user.name}</span>
+ </>
);
}