diff options
| author | Amir Zarrinkafsh <nightah@me.com> | 2021-01-02 21:58:24 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-02 21:58:24 +1100 |
| commit | 689fd7cb954afd5eaeab49e122cdd2ee86bc6c82 (patch) | |
| tree | 39ecf8710d9758edc2eb87882cadabe870ab9d1e /web/src/components/NotificationBar.tsx | |
| parent | a5ea31e482df16acda15b77b3a7db24a2a5b7be7 (diff) | |
[CI] Add linting option for frontend and enforce styling (#1565)
We now extend the default Eslint configuration and enforce styling with prettier for all of our frontend code.
Diffstat (limited to 'web/src/components/NotificationBar.tsx')
| -rw-r--r-- | web/src/components/NotificationBar.tsx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/web/src/components/NotificationBar.tsx b/web/src/components/NotificationBar.tsx index 119692665..f4202bf4e 100644 --- a/web/src/components/NotificationBar.tsx +++ b/web/src/components/NotificationBar.tsx @@ -1,8 +1,10 @@ import React, { useState, useEffect } from "react"; + import { Snackbar } from "@material-ui/core"; -import ColoredSnackbarContent from "./ColoredSnackbarContent"; + import { useNotifications } from "../hooks/NotificationsContext"; import { Notification } from "../models/Notifications"; +import ColoredSnackbarContent from "./ColoredSnackbarContent"; export interface Props { onClose: () => void; @@ -26,13 +28,15 @@ const NotificationBar = function (props: Props) { anchorOrigin={{ vertical: "top", horizontal: "right" }} autoHideDuration={tmpNotification ? tmpNotification.timeout * 1000 : 10000} onClose={props.onClose} - onExited={() => setTmpNotification(null)}> + onExited={() => setTmpNotification(null)} + > <ColoredSnackbarContent className="notification" level={tmpNotification ? tmpNotification.level : "info"} - message={tmpNotification ? tmpNotification.message : ""} /> + message={tmpNotification ? tmpNotification.message : ""} + /> </Snackbar> - ) -} + ); +}; -export default NotificationBar
\ No newline at end of file +export default NotificationBar; |
