@@ -78,19 +68,23 @@ export const SocialNav = () => {
)
}
-interface NavButtonProps {
- to: string
- isActive: boolean
+interface NavButtonProps extends NavLinkProps {
svgPath: string
viewBox?: string
}
-const NavButton = ({ to, isActive, svgPath, viewBox = '0 0 512 512' }: NavButtonProps) => (
-
(
+
+ `btn btnMain socialNavInsideBtn ${
+ isActive ? 'socialNavInsideBtnActive' : ''
+ }`
+ }
>
-
-);
-
-
+
+)
diff --git a/src/main.tsx b/src/main.tsx
index af98673..4e3a08a 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,7 +1,6 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import { Provider } from 'react-redux'
-import { HashRouter } from 'react-router-dom'
import { ToastContainer } from 'react-toastify'
import 'react-toastify/dist/ReactToastify.css'
import App from './App.tsx'
@@ -12,12 +11,10 @@ import { NDKContextProvider } from 'contexts/NDKContext.tsx'
ReactDOM.createRoot(document.getElementById('root')!).render(
-
-
-
-
-
-
+
+
+
+
)
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
new file mode 100644
index 0000000..1c53760
--- /dev/null
+++ b/src/pages/404.tsx
@@ -0,0 +1,30 @@
+import { Link } from 'react-router-dom'
+import { appRoutes } from 'routes'
+
+export const NotFoundPage = () => {
+ return (
+
+
+
+
+
+
Page not found
+
+
+
The page you're attempting to visit doesn't exist
+
+
+
+ Go home
+
+
+
+
+
+
+ )
+}
diff --git a/src/pages/feed.tsx b/src/pages/feed.tsx
new file mode 100644
index 0000000..88694d9
--- /dev/null
+++ b/src/pages/feed.tsx
@@ -0,0 +1,3 @@
+export const FeedPage = () => {
+ return
Feed
+}
diff --git a/src/pages/mod/index.tsx b/src/pages/mod/index.tsx
index 8a39cc4..0f2e87c 100644
--- a/src/pages/mod/index.tsx
+++ b/src/pages/mod/index.tsx
@@ -45,6 +45,7 @@ import {
import { Comments } from './internal/comment'
import { Reactions } from './internal/reactions'
import { Zap } from './internal/zap'
+import { CheckboxField } from 'components/Inputs'
import placeholder from '../../assets/img/DEGMods Placeholder Img.png'
export const ModPage = () => {
@@ -666,18 +667,25 @@ type ReportPopupProps = {
handleClose: () => void
}
+const MOD_REPORT_REASONS = [
+ { label: 'Actually CP', key: 'actuallyCP' },
+ { label: 'Spam', key: 'spam' },
+ { label: 'Scam', key: 'scam' },
+ { label: 'Not a game mod', key: 'notAGameMod' },
+ { label: 'Stolen game mod', key: 'stolenGameMod' },
+ { label: `Wasn't tagged NSFW`, key: 'wasntTaggedNSFW' },
+ { label: 'Other reason', key: 'otherReason' }
+]
+
const ReportPopup = ({ aTag, handleClose }: ReportPopupProps) => {
const { ndk, fetchEventFromUserRelays, publish } = useNDKContext()
const userState = useAppSelector((state) => state.user)
- const [selectedOptions, setSelectedOptions] = useState({
- actuallyCP: false,
- spam: false,
- scam: false,
- notAGameMod: false,
- stolenGameMod: false,
- wasntTaggedNSFW: false,
- otherReason: false
- })
+ const [selectedOptions, setSelectedOptions] = useState(
+ MOD_REPORT_REASONS.reduce((acc: { [key: string]: boolean }, cur) => {
+ acc[cur.key] = false
+ return acc
+ }, {})
+ )
const [isLoading, setIsLoading] = useState(false)
const [loadingSpinnerDesc, setLoadingSpinnerDesc] = useState('')
@@ -823,86 +831,15 @@ const ReportPopup = ({ aTag, handleClose }: ReportPopupProps) => {
>
Why are you reporting this?
-
-
- handleCheckboxChange('actuallyCP')}
+ {MOD_REPORT_REASONS.map((r) => (
+ handleCheckboxChange(r.key)}
/>
-
-
-
- handleCheckboxChange('spam')}
- />
-
-
-
- handleCheckboxChange('scam')}
- />
-
-
-
- handleCheckboxChange('notAGameMod')}
- />
-
-
-
- handleCheckboxChange('stolenGameMod')}
- />
-
-
-
- handleCheckboxChange('wasntTaggedNSFW')}
- />
-
-
-
- handleCheckboxChange('otherReason')}
- />
-
+ ))}