mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-23 21:59:28 -05:00
fix: logic issues (#6561)
This commit is contained in:
committed by
GitHub
parent
34d3145fcd
commit
646921cd37
+2
-1
@@ -13,6 +13,7 @@ import { RatingResponse } from "@/modules/ui/components/rating-response";
|
||||
import { ResponseBadges } from "@/modules/ui/components/response-badges";
|
||||
import { CheckCheckIcon, MousePointerClickIcon, PhoneIcon } from "lucide-react";
|
||||
import React from "react";
|
||||
import { TResponseDataValue } from "@formbricks/types/responses";
|
||||
import {
|
||||
TSurvey,
|
||||
TSurveyMatrixQuestion,
|
||||
@@ -23,7 +24,7 @@ import {
|
||||
} from "@formbricks/types/surveys/types";
|
||||
|
||||
interface RenderResponseProps {
|
||||
responseData: string | number | string[] | Record<string, string>;
|
||||
responseData: TResponseDataValue;
|
||||
question: TSurveyQuestion;
|
||||
survey: TSurvey;
|
||||
language: string | null;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export const isValidValue = (value: string | number | Record<string, string> | string[]) => {
|
||||
import { TResponseDataValue } from "@formbricks/types/responses";
|
||||
|
||||
export const isValidValue = (value: TResponseDataValue) => {
|
||||
return (
|
||||
(typeof value === "string" && value.trim() !== "") ||
|
||||
(Array.isArray(value) && value.length > 0) ||
|
||||
|
||||
Reference in New Issue
Block a user