Skip to content

Commit

Permalink
Merge pull request #44 from kyungseop/develop
Browse files Browse the repository at this point in the history
[FE] 정보 조회 및 변경 #24
  • Loading branch information
kyungseop authored Apr 28, 2019
2 parents b280865 + bba8d82 commit 724957a
Show file tree
Hide file tree
Showing 20 changed files with 4,859 additions and 3,810 deletions.
6,885 changes: 3,437 additions & 3,448 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@fortawesome/react-fontawesome": "0.1.3",
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "latest",
"react-easy-crop": "latest",
"async": "^2.6.2",
"availity-reactstrap-validation": "2.0.6",
"axios": "0.18.0",
Expand Down Expand Up @@ -41,7 +42,9 @@
"redux-promise-middleware": "5.1.1",
"redux-thunk": "2.3.0",
"tslib": "1.9.3",
"uuid": "3.3.2"
"uuid": "3.3.2",
"react-image-crop": "latest",
"@material-ui/lab": "latest"
},
"devDependencies": {
"@types/enzyme": "3.1.13",
Expand Down
55 changes: 26 additions & 29 deletions src/main/webapp/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,48 @@ import { toast, ToastContainer, ToastPosition } from 'react-toastify';

import { IRootState } from 'app/shared/reducers';
import { getSession } from 'app/shared/reducers/authentication';
import { getProfile } from 'app/shared/reducers/application-profile';
import { setLocale } from 'app/shared/reducers/locale';
import { hasAnyAuthority } from 'app/shared/auth/private-route';
import ErrorBoundary from 'app/shared/error/error-boundary';
import { AUTHORITIES } from 'app/config/constants';
import AppRoutes from 'app/routes';

export interface IAppProps extends StateProps, DispatchProps {}
export interface IAppProps extends StateProps, DispatchProps {
}

export class App extends React.Component<IAppProps> {

render() {
const paddingTop = '60px';
return (
<Router>
<div className="app-container" style={{ paddingTop }}>
<ToastContainer
position={toast.POSITION.TOP_LEFT as ToastPosition}
className="toastify-container"
toastClassName="toastify-toast"
/>
<ErrorBoundary>
<AppRoutes />
</ErrorBoundary>
</div>
</Router>
);
}
render() {
const paddingTop = '60px';
return (
<Router>
<div className="app-container" style={ { paddingTop } }>
<ToastContainer
position={ toast.POSITION.TOP_LEFT as ToastPosition }
className="toastify-container"
toastClassName="toastify-toast"
/>
<ErrorBoundary>
<AppRoutes/>
</ErrorBoundary>
</div>
</Router>
);
}
}

const mapStateToProps = ({ authentication, applicationProfile, locale }: IRootState) => ({
currentLocale: locale.currentLocale,
isAuthenticated: authentication.isAuthenticated,
isAdmin: hasAnyAuthority(authentication.account.authorities, [AUTHORITIES.ADMIN]),
ribbonEnv: applicationProfile.ribbonEnv,
isInProduction: applicationProfile.inProduction,
isSwaggerEnabled: applicationProfile.isSwaggerEnabled
const mapStateToProps = ({ authentication, locale }: IRootState) => ({
currentLocale: locale.currentLocale,
isAuthenticated: authentication.isAuthenticated,
isAdmin: hasAnyAuthority(authentication.account.authorities, [ AUTHORITIES.ADMIN ])
});

const mapDispatchToProps = { setLocale, getSession, getProfile };
const mapDispatchToProps = { setLocale, getSession };

type StateProps = ReturnType<typeof mapStateToProps>;
type DispatchProps = typeof mapDispatchToProps;

export default connect(
mapStateToProps,
mapDispatchToProps
mapStateToProps,
mapDispatchToProps
)(App);
Loading

0 comments on commit 724957a

Please sign in to comment.