diff --git a/apps/app/components/project/create-project-modal.tsx b/apps/app/components/project/create-project-modal.tsx index 3e1d0c5a2..e93fa6d10 100644 --- a/apps/app/components/project/create-project-modal.tsx +++ b/apps/app/components/project/create-project-modal.tsx @@ -9,7 +9,7 @@ import { Dialog, Transition } from "@headlessui/react"; import projectServices from "lib/services/project.service"; import workspaceService from "lib/services/workspace.service"; // common -import { createSimilarString } from "constants/common"; +import { createSimilarString, getRandomEmoji } from "constants/common"; // constants import { NETWORK_CHOICES } from "constants/"; // fetch keys @@ -32,7 +32,7 @@ const defaultValues: Partial = { identifier: "", description: "", network: 0, - icon: "", + icon: getRandomEmoji(), }; const IsGuestCondition: React.FC<{ diff --git a/apps/app/ui/emoji-icon-picker/index.tsx b/apps/app/ui/emoji-icon-picker/index.tsx index dbe8abeee..26afe7d67 100644 --- a/apps/app/ui/emoji-icon-picker/index.tsx +++ b/apps/app/ui/emoji-icon-picker/index.tsx @@ -39,7 +39,7 @@ const EmojiIconPicker: React.FC = ({ label, value, onChange }) => { }); useEffect(() => { - if (!value) onChange(getRandomEmoji()); + if (!value || value?.length === 0) onChange(getRandomEmoji()); }, [value, onChange]); return (