Skip to content

Commit

Permalink
add barebones belbin matching tool package #12
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikHorn committed Feb 26, 2020
1 parent 5892eba commit 9a1653e
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 10 deletions.
21 changes: 21 additions & 0 deletions packages/belbin-matcher/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "elite-belbin-matcher",
"version": "1.0.0",
"private": true,
"publishConfig": {
"access": "public"
},
"types": "dist/index.d.ts",
"main": "dist/index.js",
"scripts": {
"clean": "rm -rf dist/ node_modules/ tsconfig.tsbuildinfo"
},
"devDependencies": {
"@types/react": "^16.9.11",
"@types/react-router": "^5.1.3",
"elite-types": "^1.0.0"
},
"dependencies": {
"react": "^16.12.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as React from 'react';
import { RouteComponentProps } from 'react-router';

export interface BelbinMatcherPageProps extends RouteComponentProps {}

export const BelbinMatcherPage = (props: BelbinMatcherPageProps) => <div>Hier könnte Ihre Werbung stehen</div>;
1 change: 1 addition & 0 deletions packages/belbin-matcher/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components/belbinMatcherPage.component';
14 changes: 14 additions & 0 deletions packages/belbin-matcher/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"baseUrl": "src"
},
"include": ["src/**/*"],
"references": [
{
"path": "../types"
}
]
}
3 changes: 2 additions & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"elite-feature-flags": "^1.0.0",
"elite-configuration": "^1.0.0"
"elite-configuration": "^1.0.0",
"elite-belbin-matcher": "^1.0.0"
}
}
22 changes: 13 additions & 9 deletions packages/frontend/src/util/approutes.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as H from 'history';
import * as React from 'react';
import { RouteProps, Redirect } from 'react-router';
import { HomePage } from '../components/pages/HomePage';
import { LinkPage } from '../components/pages/LinkPage';
import { BelbinMatcherPage } from 'elite-belbin-matcher';

// If necessary, add support for: H.LocationDescriptor | ((location: H.Location) => H.LocationDescriptor);
type LinkType = string;
Expand Down Expand Up @@ -30,8 +30,8 @@ export function getLinkForPage(route: AppRouteProps): LinkType {

/**
* Retrieves the humand readable link title/displayed name
* for a given route
*
* for a given route
*
* @param route
*/
export function getLinkDisplayNameForPage(route: AppRouteProps): string {
Expand All @@ -48,14 +48,21 @@ export function getLinkDisplayNameForPage(route: AppRouteProps): string {
export const HOME_PAGE: AppRouteProps = {
path: '/home',
linkDisplayName: 'Home',
render: props => <HomePage {...props} />
render: props => <HomePage {...props} />,
};

// Page with searchable, useful links for elite-se-degree program
export const LINK_PAGE: AppRouteProps = {
path: '/links',
linkDisplayName: 'Useful Links',
render: props => <LinkPage {...props} />
render: props => <LinkPage {...props} />,
};

// Belbin matching tool
export const BELBIN_PAGE: AppRouteProps = {
path: '/belbin',
linkDisplayName: 'Belbin Matching Tool',
render: props => <BelbinMatcherPage {...props} />,
};

// Simply redirect to the main page on 404
Expand All @@ -64,7 +71,4 @@ export const ERROR_404_PAGE: AppRouteProps = {
render: () => <Redirect to={getLinkForPage(HOME_PAGE)} />,
};

export const APP_ROUTES: AppRouteProps[] = [
HOME_PAGE,
LINK_PAGE
];
export const APP_ROUTES: AppRouteProps[] = [HOME_PAGE, LINK_PAGE, BELBIN_PAGE];
3 changes: 3 additions & 0 deletions packages/frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{
"path": "../feature-flags"
},
{
"path": "../belbin-matcher"
},
{
"path": "../types"
}
Expand Down

0 comments on commit 9a1653e

Please sign in to comment.