fixed js-console errors

This commit is contained in:
Anton Tranelis 2024-07-02 14:11:10 +02:00
parent 02af3b5d82
commit b191466f39
5 changed files with 9 additions and 6 deletions

View File

@ -27,6 +27,7 @@ export const Layer = ({
markerIcon = 'circle-solid', markerIcon = 'circle-solid',
markerShape = 'circle', markerShape = 'circle',
markerDefaultColor = '#777', markerDefaultColor = '#777',
markerDefaultColor2,
api, api,
itemType, itemType,
itemNameField = 'name', itemNameField = 'name',
@ -79,8 +80,8 @@ export const Layer = ({
useEffect(() => { useEffect(() => {
data && setItemsData({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, api, itemType, itemNameField, itemSubnameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, setItemFormPopup, itemFormPopup, clusterRef }); data && setItemsData({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, itemNameField, itemSubnameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, setItemFormPopup, itemFormPopup, clusterRef });
api && setItemsApi({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, api, itemType, itemNameField, itemSubnameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, setItemFormPopup, itemFormPopup, clusterRef }); api && setItemsApi({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, itemNameField, itemSubnameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, setItemFormPopup, itemFormPopup, clusterRef });
}, [data, api]) }, [data, api])
useMapEvents({ useMapEvents({
@ -178,7 +179,7 @@ export const Layer = ({
const longitude = itemLongitudeField && item ? getValue(item, itemLongitudeField) : undefined; const longitude = itemLongitudeField && item ? getValue(item, itemLongitudeField) : undefined;
let color1 = markerDefaultColor; let color1 = markerDefaultColor;
let color2 = "RGBA(35, 31, 32, 0.2)"; let color2 = markerDefaultColor2;
if (itemColorField && getValue(item, itemColorField) != null) color1 = getValue(item, itemColorField); if (itemColorField && getValue(item, itemColorField) != null) color1 = getValue(item, itemColorField);
else if (itemTags && itemTags[0]) { else if (itemTags && itemTags[0]) {
color1 = itemTags[0].color; color1 = itemTags[0].color;

View File

@ -32,7 +32,7 @@ const ContactInfo = ({ email, name, avatar } : {email: string, name: string, ava
<p className="tw-font-semibold">{name}</p> <p className="tw-font-semibold">{name}</p>
<a href={`mailto:${email}`} className="tw-mt-2 tw-text-green-500 tw-flex tw-items-center"> <a href={`mailto:${email}`} className="tw-mt-2 tw-text-green-500 tw-flex tw-items-center">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
className="tw-w-4 tw-h-4 tw-mr-1"> className="tw-w-4 tw-h-4 tw-mr-1">
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path> <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
<polyline points="22,6 12,13 2,6"></polyline> <polyline points="22,6 12,13 2,6"></polyline>

View File

@ -326,9 +326,9 @@ export function OverlayItemProfile() {
{/* Description Section */} {/* Description Section */}
<div className="tw-my-10 tw-px-6"> <div className="tw-my-10 tw-px-6">
<h2 className="tw-text-lg tw-font-semibold">Beschreibung</h2> <h2 className="tw-text-lg tw-font-semibold">Beschreibung</h2>
<p className="tw-mt-2 tw-text-sm tw-text-gray-600"> <div className="tw-mt-2 tw-text-sm tw-text-gray-600">
<TextView rawText={item.text ?? 'Keine Beschreibung vorhanden'}/> <TextView rawText={item.text ?? 'Keine Beschreibung vorhanden'}/>
</p> </div>
</div> </div>
{/* Relations Section */} {/* Relations Section */}

View File

@ -5,6 +5,7 @@ const SocialShareBar = ({url, title, platforms = ['facebook', 'twitter', 'linked
<div className="tw-flex tw-items-center tw-justify-end tw-space-x-2"> <div className="tw-flex tw-items-center tw-justify-end tw-space-x-2">
{platforms.map((platform) => ( {platforms.map((platform) => (
<SocialShareButton <SocialShareButton
key={platform}
platform={platform} platform={platform}
url={url} url={url}
title={title} title={title}

View File

@ -21,6 +21,7 @@ export interface LayerProps {
markerIcon: string, markerIcon: string,
markerShape: string, markerShape: string,
markerDefaultColor: string, markerDefaultColor: string,
markerDefaultColor2: string,
api?: ItemsApi<any>, api?: ItemsApi<any>,
itemType: ItemType, itemType: ItemType,
itemNameField?: string, itemNameField?: string,