diff --git a/canopeum_frontend/src/assets/styles/muiCustomTheme.ts b/canopeum_frontend/src/assets/styles/muiCustomTheme.ts
index 5704ebeb0..557af63b0 100644
--- a/canopeum_frontend/src/assets/styles/muiCustomTheme.ts
+++ b/canopeum_frontend/src/assets/styles/muiCustomTheme.ts
@@ -22,6 +22,13 @@ const muiCustomTheme = createTheme({
},
},
components: {
+ MuiDialog: {
+ styleOverrides: {
+ root: {
+ wordWrap: 'break-word', // Same as .card
+ },
+ },
+ },
MuiDialogActions: {
styleOverrides: {
spacing: {
diff --git a/canopeum_frontend/src/components/SiteHeaderSponsors.tsx b/canopeum_frontend/src/components/SiteHeaderSponsors.tsx
new file mode 100644
index 000000000..73679be65
--- /dev/null
+++ b/canopeum_frontend/src/components/SiteHeaderSponsors.tsx
@@ -0,0 +1,26 @@
+import { useTranslation } from 'react-i18next'
+
+import BatchSponsorLogo from '@components/batches/BatchSponsorLogo'
+import type { BatchSponsor } from '@services/api'
+
+type Props = {
+ readonly sponsors: BatchSponsor[],
+}
+
+const SiteHeaderSponsors = (props: Props) => {
+ const { t } = useTranslation<'analytics'>()
+
+ return (
+
+
+
+ {props.sponsors.map(sponsor => )}
+
+
+ )
+}
+
+export default SiteHeaderSponsors
diff --git a/canopeum_frontend/src/components/analytics/AnalyticsSiteHeader.tsx b/canopeum_frontend/src/components/analytics/AnalyticsSiteHeader.tsx
index 0c236d39c..611ac2028 100644
--- a/canopeum_frontend/src/components/analytics/AnalyticsSiteHeader.tsx
+++ b/canopeum_frontend/src/components/analytics/AnalyticsSiteHeader.tsx
@@ -5,10 +5,11 @@ import { useTranslation } from 'react-i18next'
import SiteCountBadge from '@components/analytics/SiteCountBadge'
import SiteSponsorProgress from '@components/analytics/SiteSponsorProgress'
-import BatchSponsorLogo from '@components/batches/BatchSponsorLogo'
import { LanguageContext } from '@components/context/LanguageContext'
-import CustomIconBadge from '@components/CustomIconBadge'
+import IconBadge from '@components/IconBadge'
+import SiteHeaderSponsors from '@components/SiteHeaderSponsors'
import { getImageNameByWMOCategories } from '@constants/weatherImageMap'
+import { getSiteTypeIconKey } from '@models/SiteType'
import type { SiteSummaryDetail } from '@services/api'
type Props = {
@@ -50,16 +51,17 @@ const AnalyticsSiteHeader = ({ siteSummary }: Props) => {
-
+
-
{siteSummary.name}
-
-
-
{translateValue(siteSummary.siteType)}
+
{siteSummary.name}
+
+
+ {/* */}
+
{translateValue(siteSummary.siteType)}
-
+
{
/>
-
-
group
-
{translate('analyticsSite.sponsors')}:
-
- {siteSummary.sponsors.map(sponsor => (
-
- ))}
-
-
+
-
-
-
+
)
diff --git a/canopeum_frontend/src/components/social/PostComment.tsx b/canopeum_frontend/src/components/social/PostComment.tsx
index 4052d4474..51f9621c8 100644
--- a/canopeum_frontend/src/components/social/PostComment.tsx
+++ b/canopeum_frontend/src/components/social/PostComment.tsx
@@ -47,7 +47,7 @@ const PostComment = ({ comment, onDelete, siteId }: Props) => {
- {comment.body}
+ {comment.body}
)
diff --git a/canopeum_frontend/src/components/social/SiteSocialHeader.scss b/canopeum_frontend/src/components/social/SiteSocialHeader.scss
index 6c898866f..0c5638b4c 100644
--- a/canopeum_frontend/src/components/social/SiteSocialHeader.scss
+++ b/canopeum_frontend/src/components/social/SiteSocialHeader.scss
@@ -21,7 +21,7 @@
.site-social-image {
border-radius: $border-radius 0 0 $border-radius;
min-width: 256px;
- flex-basis: 25%;
+ flex-basis: 33%;
height: unset;
}
}
diff --git a/canopeum_frontend/src/components/social/SiteSocialHeader.tsx b/canopeum_frontend/src/components/social/SiteSocialHeader.tsx
index 4e2745d66..968db324b 100644
--- a/canopeum_frontend/src/components/social/SiteSocialHeader.tsx
+++ b/canopeum_frontend/src/components/social/SiteSocialHeader.tsx
@@ -3,11 +3,11 @@ import './SiteSocialHeader.scss'
import { useContext, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
-import BatchSponsorLogo from '@components/batches/BatchSponsorLogo'
import { AuthenticationContext } from '@components/context/AuthenticationContext'
import { LanguageContext } from '@components/context/LanguageContext'
import IconBadge from '@components/IconBadge'
import ToggleSwitch from '@components/inputs/ToggleSwitch'
+import SiteHeaderSponsors from '@components/SiteHeaderSponsors'
import useApiClient from '@hooks/ApiClientHook'
import type { PageViewMode } from '@models/PageViewMode.type'
import { getSiteTypeIconKey } from '@models/SiteType'
@@ -84,66 +84,53 @@ const SiteSocialHeader = ({ site, viewMode }: Props) => {
}}
/>
-
-
-
{site.name}
+
+
+
+
{site.name}
-
- {viewMode === 'admin' && (
-
- )}
-
- {currentUser
- && currentUser.role !== 'MegaAdmin'
- && isFollowing !== undefined
- && (
-
+ {viewMode === 'admin' && (
+
)}
+
+ {currentUser
+ && currentUser.role !== 'MegaAdmin'
+ && isFollowing !== undefined
+ && (
+
+ )}
+
-
-
-
-
{translateValue(site.siteType)}
+
+
+
{translateValue(site.siteType)}
+
{site.description ?? ''}
-
-
- person
- {translate('social.site-social-header.sponsors')}:
-
-
- {site.sponsors.map(sponsor => (
-
-
-
- ))}
-
-
+
diff --git a/canopeum_frontend/src/locale/en/analyticsSite.ts b/canopeum_frontend/src/locale/en/analyticsSite.ts
index 48a245ea6..b50b80e9c 100644
--- a/canopeum_frontend/src/locale/en/analyticsSite.ts
+++ b/canopeum_frontend/src/locale/en/analyticsSite.ts
@@ -3,9 +3,8 @@ export default {
'batch-tracking': 'Batch Tracking',
'site-tabs': {
analytics: 'Analytics',
- social: 'Social',
+ social: 'Social Page',
},
- 'social-page': 'Social Page',
sponsors: 'Sponsors',
'add-new-batch': 'Add a New Batch',
'edit-batch': 'Edit Batch',
diff --git a/canopeum_frontend/src/locale/en/social.ts b/canopeum_frontend/src/locale/en/social.ts
index 723c56ce5..165fe2659 100644
--- a/canopeum_frontend/src/locale/en/social.ts
+++ b/canopeum_frontend/src/locale/en/social.ts
@@ -2,7 +2,6 @@ export default {
'site-social-header': {
follow: 'Follow',
unfollow: 'Unfollow',
- sponsors: 'Sponsors',
public: 'Public',
},
comments: {
diff --git a/canopeum_frontend/src/locale/fr/analyticsSite.ts b/canopeum_frontend/src/locale/fr/analyticsSite.ts
index 27e6cf530..d8e0c3532 100644
--- a/canopeum_frontend/src/locale/fr/analyticsSite.ts
+++ b/canopeum_frontend/src/locale/fr/analyticsSite.ts
@@ -5,10 +5,9 @@ export default {
'batch-tracking': 'Suivi des lots',
'site-tabs': {
analytics: 'Analytique',
- social: 'Social',
+ social: 'Page Social',
},
- 'social-page': 'Page Sociale',
- sponsors: 'Sponsors',
+ sponsors: 'Commenditaires',
'add-new-batch': 'Ajouter un Nouveau Lot',
'edit-batch': 'Modifier un Lot',
'delete-batch': {
diff --git a/canopeum_frontend/src/locale/fr/social.ts b/canopeum_frontend/src/locale/fr/social.ts
index f6db21ff4..f54d5db37 100644
--- a/canopeum_frontend/src/locale/fr/social.ts
+++ b/canopeum_frontend/src/locale/fr/social.ts
@@ -4,7 +4,6 @@ export default {
'site-social-header': {
follow: 'Suivre',
unfollow: 'Ne plus suivre',
- sponsors: 'Commanditaires',
public: 'Publique',
},
comments: {