Skip to content

Commit 99e6e17

Browse files
committed
Pro dev page
1 parent 17d7e21 commit 99e6e17

File tree

12 files changed

+53
-3
lines changed

12 files changed

+53
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { h } from 'react-hyperscript-helpers';
2+
3+
import { PageContainer } from '@ktp/ui';
4+
5+
export const AboutPage = () => h(PageContainer, ['About Us']);

src/about-us/components/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './about-us';

src/about-us/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components';

src/about-us/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
},
99
"author": "",
1010
"license": "GPL-3.0",
11-
"dependencies": {}
11+
"dependencies": {
12+
"@ktp/ui": "1.0.0"
13+
}
1214
}

src/app/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ require('es6-promise').polyfill();
1111

1212
const App = () => {
1313
const store = configureStore();
14+
window.store = store;
1415

1516
return h(Provider, { store }, [h(RouterConn)]);
1617
};

src/app/components/routes.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { Route, Switch } from 'react-router';
33

44
import { routes } from '../constants';
55
import { HomePage } from '@ktp/home';
6+
import { AboutPage } from '@ktp/about-us';
7+
import { ProDevPage } from '@ktp/pro-dev';
68
import { Login, Logout } from '@ktp/auth';
79

810
export const Routes = () =>
@@ -12,6 +14,16 @@ export const Routes = () =>
1214
path: routes.HOME,
1315
component: HomePage,
1416
}),
17+
h(Route, {
18+
exact: true,
19+
path: routes.ABOUT,
20+
component: AboutPage,
21+
}),
22+
h(Route, {
23+
exact: true,
24+
path: routes.PRODEV,
25+
component: ProDevPage,
26+
}),
1527
h(Route, {
1628
exact: true,
1729
path: routes.LOGIN,

src/app/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ export const routes = {
77
CONTACT: '/contact',
88
LOGIN: '/login',
99
LOGOUT: '/logout',
10+
PRODEV: '/professional-development',
1011
};

src/app/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"@ktp/theme": "1.0.0",
1414
"@ktp/user": "1.0.0",
1515
"@ktp/home": "1.0.0",
16-
"@ktp/auth": "1.0.0"
16+
"@ktp/auth": "1.0.0",
17+
"@ktp/about-us": "1.0.0",
18+
"@ktp/pro-dev": "1.0.0"
1719
}
1820
}

src/pro-dev/components/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './pro-dev';

src/pro-dev/components/pro-dev.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { h } from 'react-hyperscript-helpers';
2+
import { connect } from 'react-redux';
3+
4+
import { PageContainer, PageHeading } from '@ktp/ui';
5+
import { getTheme } from '@ktp/theme';
6+
7+
export const ProDevPageBase = ({ theme }) =>
8+
h(PageContainer, [
9+
h(PageHeading, {
10+
color: theme.lavender,
11+
title: 'Professional Development',
12+
subtitle: 'Be more professional',
13+
}),
14+
]);
15+
16+
const mapStateToProps = (state) => ({
17+
theme: getTheme(state),
18+
});
19+
20+
export const ProDevPage = connect(mapStateToProps)(ProDevPageBase);

0 commit comments

Comments
 (0)