Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,17 @@ const formatArrayToRecord = (responseValue: TResponseDataValue, keys: string[]):
return result;
};

// Export for testing
export const formatAddressData = (responseValue: TResponseDataValue): Record<string, string> => {
const formatAddressData = (responseValue: TResponseDataValue): Record<string, string> => {
const addressKeys = ["addressLine1", "addressLine2", "city", "state", "zip", "country"];
return formatArrayToRecord(responseValue, addressKeys);
};

// Export for testing
export const formatContactInfoData = (responseValue: TResponseDataValue): Record<string, string> => {
const formatContactInfoData = (responseValue: TResponseDataValue): Record<string, string> => {
const contactInfoKeys = ["firstName", "lastName", "email", "phone", "company"];
return formatArrayToRecord(responseValue, contactInfoKeys);
};

// Export for testing
export const extractResponseData = (response: TResponseWithQuotas, survey: TSurvey): Record<string, any> => {
const extractResponseData = (response: TResponseWithQuotas, survey: TSurvey): Record<string, any> => {
const responseData: Record<string, any> = {};

const elements = getElementsFromBlocks(survey.blocks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface TemplateTagsProps {

type NonNullabeChannel = NonNullable<TWorkspaceConfigChannel>;

export const getRoleBasedStyling = (role: TTemplateRole | undefined): string => {
const getRoleBasedStyling = (role: TTemplateRole | undefined): string => {
switch (role) {
case "productManager":
return "border-blue-300 bg-blue-50 text-blue-500";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/modules/ui/components/multi-select/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ function Badge({ className, variant, ...props }: BadgeProps) {
return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
}

export { Badge, badgeVariants };
export { Badge };
Loading