Skip to content

Commit c4c20cf

Browse files
authored
Add clarification to feedback screen (#3083)
1 parent 6253216 commit c4c20cf

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

apps/web/ee/components/support/HelpMenuItem.tsx

+22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ExternalLinkIcon, ExclamationIcon } from "@heroicons/react/solid";
22
import { useState } from "react";
3+
import { HelpScout, useChat } from "react-live-chat-loader";
34

45
import { useLocale } from "@calcom/lib/hooks/useLocale";
56
import showToast from "@calcom/lib/notification";
@@ -18,6 +19,8 @@ export default function HelpMenuItem({ closeHelp }: HelpMenuItemProps) {
1819
const [rating, setRating] = useState<null | string>(null);
1920
const [comment, setComment] = useState("");
2021
const [disableSubmit, setDisableSubmit] = useState(true);
22+
const [active, setActive] = useState(false);
23+
const [, loadChat] = useChat();
2124
const { t } = useLocale();
2225

2326
const mutation = trpc.useMutation("viewer.submitFeedback", {
@@ -190,6 +193,25 @@ export default function HelpMenuItem({ closeHelp }: HelpMenuItemProps) {
190193
</div>
191194
)}
192195
</div>
196+
<div className="w-full bg-neutral-50 p-5">
197+
<p className="text-neutral-500">{t("specific_issue")}? </p>
198+
<span
199+
className="font-medium text-neutral-500 underline hover:text-neutral-700"
200+
onClick={() => {
201+
setActive(true);
202+
loadChat({ open: true });
203+
}}>
204+
{t("contact_support")}
205+
</span>
206+
<span className="text-neutral-500"> {t("or").toLowerCase()} </span>
207+
<a
208+
className="font-medium text-neutral-500 underline hover:text-neutral-700"
209+
href="https://docs.cal.com/"
210+
target="_blank"
211+
rel="noreferrer">
212+
{t("browse_our_docs")}.
213+
</a>
214+
</div>
193215
</div>
194216
);
195217
}

apps/web/public/static/locales/en/common.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -908,5 +908,7 @@
908908
"web_conference": "Web conference",
909909
"requires_confirmation": "Requires confirmation",
910910
"add_exchange2013": "Connect Exchange 2013 Server",
911-
"add_exchange2016": "Connect Exchange 2016 Server"
911+
"add_exchange2016": "Connect Exchange 2016 Server",
912+
"specific_issue": "Have a specific issue",
913+
"browse_our_docs": "browse our docs"
912914
}

apps/web/server/routers/viewer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ const loggedInViewerRouter = createProtectedRouter()
900900
const { rating, comment } = input;
901901

902902
const feedback = {
903-
username: ctx.user.name || "Nameless",
903+
username: ctx.user.username || "Nameless",
904904
email: ctx.user.email || "No email address",
905905
rating: rating,
906906
comment: comment,

0 commit comments

Comments
 (0)