feat: change discord link to feedback form

This commit is contained in:
Ben Furber
2024-07-01 11:03:17 +01:00
committed by benfurber
parent dacedc607b
commit 48b8f0943b
2 changed files with 42 additions and 16 deletions

View File

@@ -0,0 +1,39 @@
import { Button, ExternalLink } from 'oa-components'
import { Box, Text } from 'theme-ui'
const FORM_URL =
'https://onearmy.retool.com/form/c48a8f5a-4f53-4c58-adda-ef4f3cd8dee1'
export const StickyButton = () => {
const href = `${FORM_URL}#page=${window.location.href}`
return (
<Box
sx={{
position: 'fixed',
bottom: [2, 5],
right: [2, 5],
display: 'block',
}}
>
<ExternalLink href={href} data-cy="feedback">
<Button
sx={{ display: ['none', 'inherit'] }}
variant="primary"
icon="update"
>
<Text>Report a Problem</Text>
</Button>
<Button
sx={{ display: ['inherit', 'none'] }}
variant="primary"
icon="update"
small
>
<Text>Problem?</Text>
</Button>
</ExternalLink>
</Box>
)
}

View File

@@ -1,13 +1,13 @@
import React, { Suspense } from 'react'
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom'
import { Button, ExternalLink } from 'oa-components'
import { Analytics } from 'src/common/Analytics'
import { getSupportedModules, isModuleSupported, MODULE } from 'src/modules'
import Main from 'src/pages/common/Layout/Main'
import { SeoTagsUpdateComponent } from 'src/utils/seo'
import { Box, Flex } from 'theme-ui'
import { Flex } from 'theme-ui'
import { ScrollToTop } from '../common/ScrollToTop'
import { StickyButton } from './common/StickyButton'
import { NotFoundPage } from './NotFound/NotFound'
import {
COMMUNITY_PAGES_PROFILE,
@@ -85,20 +85,7 @@ export const Pages = () => {
</Routes>
</Suspense>
</BrowserRouter>
<Box
sx={{
position: 'fixed',
bottom: '30px',
right: '30px',
display: ['none', 'none', 'block'],
}}
>
<ExternalLink href="https://discord.gg/gJ7Yyk4" data-cy="feedback">
<Button variant="primary" icon="comment">
Join our chat
</Button>
</ExternalLink>
</Box>
<StickyButton />
</Flex>
)
}