mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: selecting random emoji on create-project
This commit is contained in:
parent
18cf044e3b
commit
a4b738508f
@ -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<IProject> = {
|
||||
identifier: "",
|
||||
description: "",
|
||||
network: 0,
|
||||
icon: "",
|
||||
icon: getRandomEmoji(),
|
||||
};
|
||||
|
||||
const IsGuestCondition: React.FC<{
|
||||
|
@ -39,7 +39,7 @@ const EmojiIconPicker: React.FC<Props> = ({ label, value, onChange }) => {
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!value) onChange(getRandomEmoji());
|
||||
if (!value || value?.length === 0) onChange(getRandomEmoji());
|
||||
}, [value, onChange]);
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user