React-based /account endpoint for editing a user profile
This commit is contained in:
parent
09fe27fe2b
commit
fbb8f5799e
14 changed files with 386 additions and 51 deletions
32
client/src/account/root.js
Normal file
32
client/src/account/root.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import i18n from '../lib/i18n';
|
||||
|
||||
import { Section } from '../lib/page'
|
||||
import Account from './Account'
|
||||
|
||||
const getStructure = t => ({
|
||||
'': {
|
||||
title: t('Home'),
|
||||
externalLink: '/',
|
||||
children: {
|
||||
'account': {
|
||||
title: t('Account'),
|
||||
link: '/account',
|
||||
component: Account
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export default function() {
|
||||
ReactDOM.render(
|
||||
<I18nextProvider i18n={ i18n }><Section root='/account' structure={getStructure}/></I18nextProvider>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue