diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx index afb5fded..5c915f1c 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx @@ -9,18 +9,22 @@ import { getValue } from '../../../../Utils/GetValue'; import remarkBreaks from 'remark-breaks'; import { decodeTag } from '../../../../Utils/FormatTags'; -export const TextView = ({ item, truncate = false, itemTextField }: { item?: Item, truncate?: boolean, itemTextField?: string }) => { +export const TextView = ({ item, truncate = false, itemTextField, rawText }: { item?: Item, truncate?: boolean, itemTextField?: string, rawText?: string }) => { const tags = useTags(); const addFilterTag = useAddFilterTag(); let text = ""; + let replacedText = ""; - if (itemTextField && item) text = getValue(item, itemTextField); - else text = item?.layer?.itemTextField && item ? getValue(item, item.layer?.itemTextField) : ""; + if (rawText) + text = replacedText = rawText; + else if (itemTextField && item) + text = getValue(item, itemTextField); + else + text = item?.layer?.itemTextField && item ? getValue(item, item.layer?.itemTextField) : ""; if (item && text && truncate) text = truncateText(removeMarkdownKeepLinksAndParagraphs(text), 100); - let replacedText; item && text ? replacedText = fixUrls(text) : ""; @@ -100,7 +104,7 @@ export const TextView = ({ item, truncate = false, itemTextField }: { item?: Ite }; return ( - { const isYouTubeVideo = href?.startsWith('https://www.youtube.com/watch?v='); diff --git a/src/Components/Profile/ContactInfo.tsx b/src/Components/Profile/ContactInfo.tsx index 7a8bc86d..87ad1fdb 100644 --- a/src/Components/Profile/ContactInfo.tsx +++ b/src/Components/Profile/ContactInfo.tsx @@ -8,17 +8,25 @@ const ContactInfo = ({ email, name, avatar } : {email: string, name: string, ava

Du hast Fragen?

-
- {avatar ? ( - {name} - ) : ( - - - - - - )} +
+
+
+ {avatar ? ( + {name} + ) : ( +
+ + + + +
+ )} +
+

{name}

@@ -35,6 +43,7 @@ const ContactInfo = ({ email, name, avatar } : {email: string, name: string, ava
-)} + ) +} export default ContactInfo; \ No newline at end of file diff --git a/src/Components/Profile/OverlayItemProfile.tsx b/src/Components/Profile/OverlayItemProfile.tsx index b4b73d03..0dc26b78 100644 --- a/src/Components/Profile/OverlayItemProfile.tsx +++ b/src/Components/Profile/OverlayItemProfile.tsx @@ -25,7 +25,6 @@ import { TagView } from '../Templates/TagView'; import RelationCard from "./RelationCard"; import ContactInfo from "./ContactInfo"; import ProfileSubHeader from "./ProfileSubHeader"; -import SocialShareBar from './SocialShareBar'; export function OverlayItemProfile() { @@ -276,7 +275,7 @@ export function OverlayItemProfile() { const d = { groupName: "Gruppe Berlin-Britz", - location: "12347 Berlin-Britz", + location: "🇩🇪 12347 Berlin", country: "Berlin, Deutschland", countryCode: "de", contact: { @@ -298,6 +297,7 @@ export function OverlayItemProfile() { }; + return ( <> {item && @@ -305,26 +305,31 @@ export function OverlayItemProfile() { className={`${item.layer?.itemType.onepager && '!tw-p-0'} tw-mx-4 tw-mt-4 tw-max-h-[calc(100dvh-96px)] tw-h-[calc(100dvh-96px)] md:tw-w-[calc(50%-32px)] tw-w-[calc(100%-32px)] tw-min-w-80 tw-max-w-3xl !tw-left-0 sm:!tw-left-auto tw-top-0 tw-bottom-0 tw-transition-opacity tw-duration-500 ${!selectPosition ? 'tw-opacity-100 tw-pointer-events-auto' : 'tw-opacity-0 tw-pointer-events-none'}`}> <> -
- navigate("/edit-item/" + item.id)} setPositionCallback={() => { map.closePopup(); setSelectPosition(item); navigate("/") }} big truncateSubname={false} /> - - -
+
+ navigate("/edit-item/" + item.id)} setPositionCallback={() => { map.closePopup(); setSelectPosition(item); navigate("/") }} big truncateSubname={false} /> + +
{item.layer?.itemType.onepager && <> - - + {item.user_created.first_name && ( + + )} {/* Description Section */} - - - - {d.contact && ( - - )} +
+

Beschreibung

+

+ +

+
{/* Relations Section */} {d.relations && ( diff --git a/src/Components/Profile/ProfileSubHeader.tsx b/src/Components/Profile/ProfileSubHeader.tsx index 0bec7344..e89e2834 100644 --- a/src/Components/Profile/ProfileSubHeader.tsx +++ b/src/Components/Profile/ProfileSubHeader.tsx @@ -18,12 +18,11 @@ const flags = { ) }; -const SubHeader = ({ location, country, countryCode, url, title }) => ( -
+const SubHeader = ({ location, type, url, title }) => ( +
- {location} - {flags[countryCode] || null} - {country} + {type} + {location}
diff --git a/src/Components/Profile/SocialShareBar.tsx b/src/Components/Profile/SocialShareBar.tsx index 61a07207..0c2ab637 100644 --- a/src/Components/Profile/SocialShareBar.tsx +++ b/src/Components/Profile/SocialShareBar.tsx @@ -1,17 +1,15 @@ import SocialShareButton from './SocialShareButton'; -const SocialShareBar = ({ url, title, platforms = ['facebook', 'twitter', 'linkedin', 'xing', 'email'] }) => { +const SocialShareBar = ({url, title, platforms = ['facebook', 'twitter', 'linkedin', 'xing', 'email']}) => { return (
-
- {platforms.map((platform) => ( - - ))} -
+ {platforms.map((platform) => ( + + ))}
); };