Skip to content

Commit

Permalink
fix(docs): fix feedback form logic (#1940)
Browse files Browse the repository at this point in the history
  • Loading branch information
chdeskur authored Dec 23, 2024
1 parent 49dd8cc commit fa6a587
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/fern-docs/ui/src/feedback/FeedbackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,19 @@ export const FeedbackForm: FC<FeedbackFormProps> = ({
const [showEmailInput, setShowEmailInput] = useAtom(SHOW_EMAIL_INPUT_ATOM);
const [email, setEmail] = useAtom(EMAIL_ATOM);

const legend = isHelpful
? "What did you like?"
: isHelpful === "no"
? "What went wrong?"
: "Feedback";
const feedbackOptions = useMemo<FernDropdown.Option[]>(() => {
const options = isHelpful
? POSITIVE_FEEDBACK
const legend =
isHelpful === "yes"
? "What did you like?"
: isHelpful === "no"
? NEGATIVE_FEEDBACK
: [];
? "What went wrong?"
: "Feedback";
const feedbackOptions = useMemo<FernDropdown.Option[]>(() => {
const options =
isHelpful === "yes"
? POSITIVE_FEEDBACK
: isHelpful === "no"
? NEGATIVE_FEEDBACK
: [];
const transformedOptions: FernDropdown.Option[] = options.map(
(option): FernDropdown.Option => ({
type: "value",
Expand Down

0 comments on commit fa6a587

Please sign in to comment.