diff --git a/client/src/components/UI/Buttons/ActionButton/ActionButton.tsx b/client/src/components/UI/Buttons/ActionButton/ActionButton.tsx
index 3e99935..8100271 100644
--- a/client/src/components/UI/Buttons/ActionButton/ActionButton.tsx
+++ b/client/src/components/UI/Buttons/ActionButton/ActionButton.tsx
@@ -2,55 +2,45 @@ import { Fragment } from 'react';
import { Link } from 'react-router-dom';
import classes from './ActionButton.module.css';
-import Icon from '../../Icons/Icon/Icon';
+import { Icon } from '../..';
-interface ComponentProps {
+interface Props {
name: string;
icon: string;
link?: string;
handler?: () => void;
}
-const ActionButton = (props: ComponentProps): JSX.Element => {
+export const ActionButton = (props: Props): JSX.Element => {
const body = (
-
- {props.name}
-
+ {props.name}
);
if (props.link) {
return (
-
+
{body}
- )
+ );
} else if (props.handler) {
return (
{
- if (e.key === 'Enter' && props.handler) props.handler()
+ if (e.key === 'Enter' && props.handler) props.handler();
}}
tabIndex={0}
- >{body}
-
- )
- } else {
- return (
-
+ >
{body}
- )
+ );
+ } else {
+ return {body}
;
}
-}
-
-export default ActionButton;
\ No newline at end of file
+};
diff --git a/client/src/components/UI/Buttons/Button/Button.tsx b/client/src/components/UI/Buttons/Button/Button.tsx
index 5f113d8..5e9e9d5 100644
--- a/client/src/components/UI/Buttons/Button/Button.tsx
+++ b/client/src/components/UI/Buttons/Button/Button.tsx
@@ -1,21 +1,16 @@
import classes from './Button.module.css';
-interface ComponentProps {
+interface Props {
children: string;
click?: any;
}
-const Button = (props: ComponentProps): JSX.Element => {
- const {
- children,
- click
- } = props;
+export const Button = (props: Props): JSX.Element => {
+ const { children, click } = props;
return (
-