mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
small fix
This commit is contained in:
parent
cc1a27e6ef
commit
f1b338f36e
@ -16,7 +16,7 @@ export default function NavBar({ appName}: { appName: string }) {
|
||||
const items = useItems();
|
||||
|
||||
useEffect(() => {
|
||||
const profile = user && items.find(i => (i.user_created.id === user.id) && i.layer?.itemType.name === "user");
|
||||
const profile = user && items.find(i => (i.user_created?.id === user.id) && i.layer?.itemType.name === "user");
|
||||
profile ? setUserProfile(profile) : setUserProfile({id: crypto.randomUUID(), name: user?.first_name, text: ""});
|
||||
}, [user, items])
|
||||
|
||||
|
||||
@ -176,11 +176,8 @@ export const Layer = ({
|
||||
const longitude = itemLongitudeField && item ? getValue(item, itemLongitudeField) : undefined;
|
||||
|
||||
let color1 = markerDefaultColor;
|
||||
let color2 = "RGBA(35, 31, 32, 0.2)";
|
||||
console.log(getValue(item, itemColorField));
|
||||
|
||||
let color2 = "RGBA(35, 31, 32, 0.2)";
|
||||
if (itemColorField && getValue(item, itemColorField) != null) color1 = getValue(item, itemColorField);
|
||||
|
||||
else if (itemTags && itemTags[0]) {
|
||||
color1 = itemTags[0].color;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user