mirror of
https://github.com/fergalmoran/onearmy-community-platform.git
synced 2025-12-22 09:37:54 +00:00
feat: change discord link to feedback form
This commit is contained in:
39
src/pages/common/StickyButton.tsx
Normal file
39
src/pages/common/StickyButton.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user