aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components/presentational/IconFromUserType.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/components/presentational/IconFromUserType.tsx')
-rw-r--r--src/client/react/components/presentational/IconFromUserType.tsx31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/client/react/components/presentational/IconFromUserType.tsx b/src/client/react/components/presentational/IconFromUserType.tsx
deleted file mode 100644
index d77ea1b..0000000
--- a/src/client/react/components/presentational/IconFromUserType.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import * as React from 'react';
-import StudentIcon = require('react-icons/lib/md/person');
-import RoomIcon = require('react-icons/lib/md/room');
-import ClassIcon = require('react-icons/lib/md/group');
-import TeacherIcon = require('react-icons/lib/md/account-circle');
-
-// interface IconFromUserTypeProps {
-// userType: string,
-// defaultIcon?: JSX.Element,
-// }
-
-const IconFromUserType: React.StatelessComponent<{ userType: string, defaultIcon?: JSX.Element }> = (props) => {
- switch (props.userType) {
- case 'c':
- return <ClassIcon />;
- case 't':
- return <TeacherIcon />;
- case 's':
- return <StudentIcon />;
- case 'r':
- return <RoomIcon />;
- default:
- if (props.defaultIcon) {
- return props.defaultIcon;
- }
-
- throw new Error('`userType` was invalid or not given, but `defaultIcon` is not defined.');
- }
-};
-
-export default IconFromUserType;