feat: replace emojis in survey editor and survey fetching (#3047)

Co-authored-by: Johannes <johannes@formbricks.com>
This commit is contained in:
Filip Gornitzka Abelson
2024-08-26 14:39:41 +02:00
committed by GitHub
parent 4a6d7952a7
commit 899fbef948
4 changed files with 18 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ import { useSortable } from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
import { createId } from "@paralleldrive/cuid2";
import * as Collapsible from "@radix-ui/react-collapsible";
import { GripIcon } from "lucide-react";
import { GripIcon, Handshake, Undo2 } from "lucide-react";
import { cn } from "@formbricks/lib/cn";
import { recallToHeadline } from "@formbricks/lib/utils/recall";
import { TAttributeClass } from "@formbricks/types/attribute-classes";
@@ -129,7 +129,13 @@ export const EditEndingCard = ({
"flex w-10 flex-col items-center justify-between rounded-l-lg border-b border-l border-t py-2 group-aria-expanded:rounded-bl-none",
isInvalid ? "bg-red-400" : "bg-white group-hover:bg-slate-50"
)}>
<p className="mt-3">{endingCard.type === "endScreen" ? "🙏" : "↪️"}</p>
<div className="mt-3 flex w-full justify-center">
{endingCard.type === "endScreen" ? (
<Handshake className="h-4 w-4" />
) : (
<Undo2 className="h-4 w-4 rotate-180" />
)}
</div>
<button className="opacity-0 transition-all duration-300 hover:cursor-move group-hover:opacity-100">
<GripIcon className="h-4 w-4" />
</button>

View File

@@ -1,6 +1,7 @@
"use client";
import * as Collapsible from "@radix-ui/react-collapsible";
import { Hand } from "lucide-react";
import { usePathname } from "next/navigation";
import { useState } from "react";
import { LocalizedEditor } from "@formbricks/ee/multi-language/components/localized-editor";
@@ -66,7 +67,7 @@ export const EditWelcomeCard = ({
"flex w-10 items-center justify-center rounded-l-lg border-b border-l border-t group-aria-expanded:rounded-bl-none",
isInvalid ? "bg-red-400" : "bg-white group-hover:bg-slate-50"
)}>
<p></p>
<Hand className="h-4 w-4" />
</div>
<Collapsible.Root
open={open}

View File

@@ -1,6 +1,7 @@
"use client";
import * as Collapsible from "@radix-ui/react-collapsible";
import { EyeOff } from "lucide-react";
import { useState } from "react";
import { toast } from "react-hot-toast";
import { cn } from "@formbricks/lib/cn";
@@ -71,7 +72,7 @@ export const HiddenFieldsCard = ({
open ? "bg-slate-50" : "bg-white group-hover:bg-slate-50",
"flex w-10 items-center justify-center rounded-l-lg border-b border-l border-t group-aria-expanded:rounded-bl-none"
)}>
<p>🥷</p>
<EyeOff className="h-4 w-4" />
</div>
<Collapsible.Root
open={open}

View File

@@ -5,6 +5,7 @@ import { TEnvironment } from "@formbricks/types/environment";
import { TProductConfigChannel } from "@formbricks/types/product";
import { TSurvey, TSurveyFilters } from "@formbricks/types/surveys/types";
import { Button } from "../Button";
import { LoadingSpinner } from "../LoadingSpinner";
import { getSurveysAction } from "./actions";
import { SurveyCard } from "./components/SurveyCard";
import { SurveyFilters } from "./components/SurveyFilters";
@@ -176,10 +177,11 @@ export const SurveysList = ({
)}
</div>
) : (
<div className="flex h-full flex-col items-center justify-center">
<span className="mb-4 h-24 w-24 rounded-full bg-slate-100 p-6 text-5xl">🕵</span>
<div className="text-slate-600">{isFetching ? "Fetching surveys..." : "No surveys found"}</div>
<div className="flex h-full flex-col items-center justify-center py-12">
<LoadingSpinner />
<div className="text-sm text-slate-500">
{isFetching ? "Fetching surveys..." : "No surveys found"}
</div>
</div>
)}
</div>