Skip to content

Commit

Permalink
fixes user feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Cefali committed Jan 11, 2024
1 parent ac727f4 commit 89801d2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 66 deletions.
56 changes: 0 additions & 56 deletions app/components/feedback-button.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion app/entry.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { hydrateRoot } from 'react-dom/client'
if (window.ENV?.MODE === 'development') {
import('~/utils/devtools.tsx').then(({ init }) => init())
}
if (window.ENV?.MODE === 'production' && window.ENV?.SENTRY_DSN) {
if (window.ENV?.SENTRY_DSN) {
import('~/utils/monitoring.client.tsx').then(({ init }) => init())
}
startTransition(() => {
Expand Down
12 changes: 4 additions & 8 deletions app/routes/app.summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
} from '~/@/components/ui/select.tsx'
import GithubContributionSummary from '~/components/github-contribution-summary.tsx'
import AppLayout from '~/components/app-layout'
import FeedbackButton from '~/components/feedback-button'
import { prisma } from '~/utils/db.server'

type ActionData =
Expand Down Expand Up @@ -60,20 +59,17 @@ export default function Summary() {
const timePeriod = queryParams.get('timePeriod')
const navigation = useNavigation()
const submitting = navigation.state === 'submitting'
const disableButton = submitting;
const disableButton = submitting
return (
<AppLayout>
<Form
className="m-auto rounded-sm bg-secondary p-8 "
action="/app/summary"
method="GET"
>
<div className="flex justify-between ">
<h1 className="text-lg font-bold">
See a Summary of Github Contributions
</h1>
<FeedbackButton />
</div>
<h1 className="text-lg font-bold">
See a Summary of Github Contributions
</h1>
<Input
type="text"
placeholder="GitHub Username"
Expand Down
4 changes: 4 additions & 0 deletions app/utils/monitoring.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export function init() {
new Sentry.Feedback({
// Additional SDK configuration goes in here, for example:
colorScheme: 'dark',
formTitle: 'Feedback',
messagePlaceholder: 'Tell us your feedback',
buttonLabel: 'Feedback',
submitButtonLabel: 'Submit',
}),
],
beforeSend(event, hint) {
Expand Down
2 changes: 1 addition & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ app.use(
directives: {
'connect-src': [
MODE === 'development' ? 'ws:' : null,
process.env.SENTRY_DSN ? '*.ingest.sentry.io' : null,
process.env.SENTRY_DSN ? '*.ingest.sentry.io sentry.io' : null,
"'self'",
].filter(Boolean),
'font-src': ["'self'"],
Expand Down

0 comments on commit 89801d2

Please sign in to comment.