1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 23:15:24 +02:00

chore: remove all feedback related components

fixes #65. there shouldn't be any more feedback related components or
anything referencing to them.

Signed-off-by: Andreas <a@ndy.sh>
This commit is contained in:
Andreas 2024-01-14 21:55:00 -05:00
parent 9fcf21e2cc
commit ae2e60ed65
5 changed files with 0 additions and 92 deletions

View file

@ -17,8 +17,6 @@ NX_PLAID_SECRET=
NX_FINICITY_APP_KEY= NX_FINICITY_APP_KEY=
NX_FINICITY_PARTNER_SECRET= NX_FINICITY_PARTNER_SECRET=
NEXT_PUBLIC_ZAPIER_FEEDBACK_HOOK_URL=
# Email credentials # Email credentials
NX_POSTMARK_FROM_ADDRESS=account@example.com NX_POSTMARK_FROM_ADDRESS=account@example.com
NX_POSTMARK_REPLY_TO_ADDRESS=support@example.com NX_POSTMARK_REPLY_TO_ADDRESS=support@example.com

View file

@ -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 (
<Dialog isOpen={isOpen} onClose={onClose}>
<Dialog.Title>Send us your feedback!</Dialog.Title>
<Dialog.Content>
{notImplementedNotice ? (
<p className="text-sm text-white mb-6">
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?
</p>
) : (
<p className="text-sm text-gray-100 mb-6">
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!{' '}
<span role="img" aria-label="happy emoji">
😄
</span>
)
</p>
)}
<form
onSubmit={async (e) => {
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()
}}
>
<textarea
value={feedback}
onChange={(e) => setFeedback(e.target.value)}
className="w-full rounded bg-gray-500 text-base border-0 focus:ring focus:ring-opacity-60 focus:ring-cyan"
rows={6}
></textarea>
<Button className="mt-4" type="submit" disabled={feedback.length < 10}>
Submit
</Button>
</form>
</Dialog.Content>
</Dialog>
)
}

View file

@ -1,2 +1 @@
export * from './FeedbackDialog'
export * from './NonUSDDialog' export * from './NonUSDDialog'

View file

@ -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 (
<div className="mt-6 text-center">
<Button onClick={() => setIsOpen(true)}>Send us your feedback</Button>
<FeedbackDialog isOpen={isOpen} onClose={() => setIsOpen(false)} />
</div>
)
}

View file

@ -1,4 +1,3 @@
export * from './FeedbackButton'
export * from './TrendBadge' export * from './TrendBadge'
export * from './Toaster' export * from './Toaster'
export * from './BoxIcon' export * from './BoxIcon'