Add feedback button, show modal only on homepage

This commit is contained in:
Valtteri Karesto
2022-06-29 11:31:46 +03:00
parent c6ced424d8
commit a9b64abb85

View File

@@ -17,6 +17,8 @@ import TimeAgo from "javascript-time-ago";
import en from "javascript-time-ago/locale/en.json";
import { useSnapshot } from "valtio";
import Alert from "../components/AlertDialog";
import { Button, Flex } from "../components";
import { ChatCircleText } from "phosphor-react";
TimeAgo.setDefaultLocale(en.locale);
TimeAgo.addLocale(en);
@@ -37,7 +39,7 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }: AppProps) {
if (
!gistId &&
router.isReady &&
!router.pathname.includes("/sign-in") &&
router.pathname.includes("/develop") &&
!snap.files.length &&
!snap.mainModalShowed
) {
@@ -141,6 +143,17 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }: AppProps) {
})(),
}}
/>
<Flex
as="a"
href="https://github.com/XRPLF/Hooks/discussions"
target="_blank"
css={{ position: "fixed", right: "$4", bottom: "$4" }}
>
<Button size="sm" variant="primary" outline>
<ChatCircleText size={12} style={{ marginRight: "0px" }} />
Send feedback
</Button>
</Flex>
<Alert />
</ThemeProvider>
</SessionProvider>