diff --git a/src/components/challenge-modal/challenge-modal.module.css b/src/components/challenge-modal/challenge-modal.module.css index 64a25b19..e4e1af72 100644 --- a/src/components/challenge-modal/challenge-modal.module.css +++ b/src/components/challenge-modal/challenge-modal.module.css @@ -77,4 +77,10 @@ cursor: pointer; filter: var(--filter80); text-transform: capitalize; +} + +@media (max-width: 640px) { + .title { + cursor: default; + } } \ No newline at end of file diff --git a/src/components/challenge-modal/challenge-modal.tsx b/src/components/challenge-modal/challenge-modal.tsx index ea8c2f33..09461170 100644 --- a/src/components/challenge-modal/challenge-modal.tsx +++ b/src/components/challenge-modal/challenge-modal.tsx @@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'; import { Challenge as ChallengeType } from '@plebbit/plebbit-react-hooks'; import { getPublicationType } from '../../lib/utils/challenge-utils'; import useChallenges from '../../hooks/use-challenges'; +import useWindowWidth from '../../hooks/use-window-width'; import styles from './challenge-modal.module.css'; import _ from 'lodash'; @@ -53,67 +54,74 @@ const Challenge = ({ challenge, closeModal }: ChallengeProps) => { // react-draggable requires a ref to the modal node const nodeRef = useRef(null); + const isMobile = useWindowWidth() < 640; - return ( - -
-
- Challenge for {publicationType} -
+
+
+
-
-
- + {title && ( +
+
- {title && ( -
- -
- )} - {content && ( -
-