diff --git a/src/components/Overlay/Overlay.module.scss b/src/components/Overlay/Overlay.module.scss deleted file mode 100644 index e74c36f8..00000000 --- a/src/components/Overlay/Overlay.module.scss +++ /dev/null @@ -1,12 +0,0 @@ -.overlay { - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - background-color: rgba(0, 0, 0, 0.5); - z-index: 2; - display: grid; - overflow-x: hidden; - grid-template-columns: repeat(1fr, 4); -} \ No newline at end of file diff --git a/src/components/Overlay/Overlay.module.scss.d.ts b/src/components/Overlay/Overlay.module.scss.d.ts deleted file mode 100644 index 0a28e190..00000000 --- a/src/components/Overlay/Overlay.module.scss.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type Styles = { - overlay: string -} - -export type ClassNames = keyof Styles - -declare const styles: Styles - -export default styles diff --git a/src/components/Overlay/Overlay.tsx b/src/components/Overlay/Overlay.tsx deleted file mode 100644 index 430807ca..00000000 --- a/src/components/Overlay/Overlay.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import {FC, MouseEvent, ReactNode} from 'react' - -import styles from './Overlay.module.scss' - -interface OverlayProps { - display: boolean - closeOverlay: () => void - children: ReactNode -} - -export const Overlay: FC = ({children, display, closeOverlay}) => { - const handleClick = (e: MouseEvent) => { - // Po kliknutí na overlay, mimo akýchkoľvek iných elementov, sa overlay zatvorí. - if ((e.target as Element).classList.contains(styles.overlay)) { - closeOverlay() - } - } - - return display ? ( -
- {children} -
- ) : null -} diff --git a/src/components/Problems/Discussion.module.scss b/src/components/Problems/Discussion.module.scss deleted file mode 100644 index 17f1dbaa..00000000 --- a/src/components/Problems/Discussion.module.scss +++ /dev/null @@ -1,5 +0,0 @@ -.textArea { - width: 100%; - height: 60px; - border: 3px solid black; -} \ No newline at end of file diff --git a/src/components/Problems/Discussion.module.scss.d.ts b/src/components/Problems/Discussion.module.scss.d.ts deleted file mode 100644 index 699c71a4..00000000 --- a/src/components/Problems/Discussion.module.scss.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type Styles = { - textArea: string -} - -export type ClassNames = keyof Styles - -declare const styles: Styles - -export default styles diff --git a/src/components/Problems/Discussion.tsx b/src/components/Problems/Discussion.tsx index 6cea7843..ec4b91c6 100644 --- a/src/components/Problems/Discussion.tsx +++ b/src/components/Problems/Discussion.tsx @@ -11,8 +11,6 @@ import {useHasPermissions} from '@/utils/useHasPermissions' import {Button} from '../Clickable/Button' import {Dialog} from '../Dialog/Dialog' import {Loading} from '../Loading/Loading' -import styles from './Discussion.module.scss' -import {SideContainer} from './SideContainer' interface DiscussionProps { problemId: number @@ -21,7 +19,7 @@ interface DiscussionProps { invalidateSeriesQuery: () => Promise } -export const Discussion: FC = ({problemId, problemNumber, closeDiscussion, invalidateSeriesQuery}) => { +export const Discussion: FC = ({problemId, invalidateSeriesQuery}) => { const [commentText, setCommentText] = useState('') const [hiddenResponseText, setHiddenResponseText] = useState('') const [hiddenResponseDialogId, sethiddenResponseDialogId] = useState(-1) @@ -101,7 +99,7 @@ export const Discussion: FC = ({problemId, problemNumber, close } return ( - + <> {/* delete comment dialog */} = ({problemId, problemNumber, close } /> - + {commentsIsLoading && } {comments && @@ -131,7 +129,9 @@ export const Discussion: FC = ({problemId, problemNumber, close {comment.posted_by_name} - {comment.text} + + {comment.text} + {comment.hidden_response && ( @@ -149,7 +149,7 @@ export const Discussion: FC = ({problemId, problemNumber, close {hiddenResponseDialogId === comment.id ? (