mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
Fix paranthesis in ProfileForm
This commit is contained in:
parent
aa616ed295
commit
cb727d433d
@ -88,9 +88,10 @@ export function ProfileForm() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const newColor =
|
const newColor =
|
||||||
(item.color ?? (getItemTags(item) && getItemTags(item)[0]?.color))
|
item.color ??
|
||||||
|
(getItemTags(item) && getItemTags(item)[0]?.color
|
||||||
? getItemTags(item)[0].color
|
? getItemTags(item)[0].color
|
||||||
: item.layer?.markerDefaultColor
|
: item.layer?.markerDefaultColor)
|
||||||
|
|
||||||
const offers = (item.offers ?? []).reduce((acc: Tag[], o) => {
|
const offers = (item.offers ?? []).reduce((acc: Tag[], o) => {
|
||||||
const offer = tags.find((t) => t.id === o.tags_id)
|
const offer = tags.find((t) => t.id === o.tags_id)
|
||||||
@ -195,7 +196,7 @@ export function ProfileForm() {
|
|||||||
type='submit'
|
type='submit'
|
||||||
style={{
|
style={{
|
||||||
// We could refactor this, it is used several times at different locations
|
// We could refactor this, it is used several times at different locations
|
||||||
backgroundColor: `${(item.color ?? (getItemTags(item) && getItemTags(item)[0] && getItemTags(item)[0].color)) ? getItemTags(item)[0].color : item?.layer?.markerDefaultColor}`,
|
backgroundColor: `${item.color ?? (getItemTags(item) && getItemTags(item)[0] && getItemTags(item)[0].color ? getItemTags(item)[0].color : item?.layer?.markerDefaultColor)}`,
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user