Skip to content

Commit

Permalink
Merge pull request #2361 from MahtabBukhari/hash_tag_should_be_presen…
Browse files Browse the repository at this point in the history
…t_with_hexa_color_value

Hash tag should be present with hexa color value
  • Loading branch information
Rassl authored Oct 27, 2024
2 parents 626d447 + fbd069f commit 58bcc78
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const handleSubmitForm = async (
data: FieldValues,
isUpdate = false,
deletedAttributes: string[],
selectedPrimaryColor: string,
selectedColor: string,
selectedIcon: string,
mediaOptions: { videoAudio: boolean; image: boolean; sourceLink: boolean },
initialMediaOptions: { videoAudio: boolean; image: boolean; sourceLink: boolean },
Expand All @@ -96,8 +96,8 @@ const handleSubmitForm = async (
index: selectedIndex,
}

if (selectedPrimaryColor) {
requestData.primary_color = selectedPrimaryColor
if (selectedColor) {
requestData.primary_color = selectedColor
}

if (selectedIcon) {
Expand Down Expand Up @@ -220,8 +220,6 @@ export const Editor = ({
const { selectedColor, selectedIcon } = useAppStore((s) => s)
const [isPopoverOpen, setPopoverOpen] = useState(!!selectedSchema)

const selectedPrimaryColor = selectedColor.replace('#', '')

const handleColorPickerPopover = () => setPopoverOpen(!isPopoverOpen)

useEffect(
Expand Down Expand Up @@ -376,7 +374,7 @@ export const Editor = ({
await editNodeSchemaUpdate(selectedSchema?.ref_id as string, {
type: data.type,
parent: newParent as string,
primary_color: selectedPrimaryColor,
primary_color: selectedColor,
icon: selectedIcon,
attributes: {
...toggleMedia,
Expand All @@ -391,7 +389,7 @@ export const Editor = ({
{ ...data, ...(selectedSchema ? { ref_id: selectedSchema?.ref_id } : {}) },
!!selectedSchema,
deletedAttributes,
selectedPrimaryColor,
selectedColor,
selectedIcon,
mediaOptions,
{
Expand Down

0 comments on commit 58bcc78

Please sign in to comment.