diff --git a/.env.example b/.env.example index 7a2105c1..0f2e063d 100644 --- a/.env.example +++ b/.env.example @@ -17,8 +17,6 @@ NX_PLAID_SECRET= NX_FINICITY_APP_KEY= NX_FINICITY_PARTNER_SECRET= -NEXT_PUBLIC_ZAPIER_FEEDBACK_HOOK_URL= - # Email credentials NX_POSTMARK_FROM_ADDRESS=account@example.com NX_POSTMARK_REPLY_TO_ADDRESS=support@example.com diff --git a/libs/client/shared/src/components/dialogs/FeedbackDialog.tsx b/libs/client/shared/src/components/dialogs/FeedbackDialog.tsx deleted file mode 100644 index d6f86e9f..00000000 --- a/libs/client/shared/src/components/dialogs/FeedbackDialog.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import { useSession } from 'next-auth/react' -import { Button, Dialog } from '@maybe-finance/design-system' -import { useState } from 'react' -import axios from 'axios' -import toast from 'react-hot-toast' - -export interface FeedbackDialogProps { - isOpen: boolean - onClose: () => void - notImplementedNotice?: boolean -} - -export function FeedbackDialog({ isOpen, onClose, notImplementedNotice }: FeedbackDialogProps) { - const [feedback, setFeedback] = useState('') - const { data: session } = useSession() - - return ( - - Send us your feedback! - - {notImplementedNotice ? ( -

- This feature has not been implemented yet, but is coming soon! Mind helping - us out and telling us what you want with this particular feature below? -

- ) : ( -

- Maybe is built in public and relies heavily on user feedback. We'd love to - hear what you think could be better (please be constructive, we're still in - the early days!{' '} - - 😄 - - ) -

- )} -
{ - e.preventDefault() - - try { - await axios - .create({ transformRequest: [(data) => JSON.stringify(data)] }) - .post( - process.env.NEXT_PUBLIC_ZAPIER_FEEDBACK_HOOK_URL || - 'REPLACE_THIS', - { - comment: `**From user:** ${session?.user?.email}\n\n${feedback}`, - page: `**Main app feedback**: ${window.location.href}`, - } - ) - - toast.success('Your feedback was submitted!') - } catch (e) { - toast.error('Feedback not submitted') - } - - onClose() - }} - > - - -
-
-
- ) -} diff --git a/libs/client/shared/src/components/dialogs/index.ts b/libs/client/shared/src/components/dialogs/index.ts index 92655e0b..50dbd5b0 100644 --- a/libs/client/shared/src/components/dialogs/index.ts +++ b/libs/client/shared/src/components/dialogs/index.ts @@ -1,2 +1 @@ -export * from './FeedbackDialog' export * from './NonUSDDialog' diff --git a/libs/client/shared/src/components/generic/FeedbackButton.tsx b/libs/client/shared/src/components/generic/FeedbackButton.tsx deleted file mode 100644 index c3611ff0..00000000 --- a/libs/client/shared/src/components/generic/FeedbackButton.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { Button } from '@maybe-finance/design-system' -import { useState } from 'react' -import { FeedbackDialog } from '../dialogs' - -export function FeedbackButton() { - const [isOpen, setIsOpen] = useState(false) - - return ( -
- - setIsOpen(false)} /> -
- ) -} diff --git a/libs/client/shared/src/components/generic/index.ts b/libs/client/shared/src/components/generic/index.ts index df90b1a4..47d27df0 100644 --- a/libs/client/shared/src/components/generic/index.ts +++ b/libs/client/shared/src/components/generic/index.ts @@ -1,4 +1,3 @@ -export * from './FeedbackButton' export * from './TrendBadge' export * from './Toaster' export * from './BoxIcon'