Skip to content

Commit

Permalink
fix: landing page meta
Browse files Browse the repository at this point in the history
  • Loading branch information
melniiv committed Dec 16, 2024
1 parent 4b25edb commit cf56952
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 12 deletions.
5 changes: 5 additions & 0 deletions apps/events-helsinki/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
RouteMeta,
useResilientTranslation,
PreviewNotification,
PageMeta,
} from '@events-helsinki/components';
import { logger } from '@events-helsinki/components/loggers/logger';
import type {
Expand Down Expand Up @@ -63,6 +64,10 @@ const HomePage: NextPage<{
<>
<PreviewNotification token={previewToken} />
<RouteMeta origin={AppConfig.origin} />
<PageMeta
{...page?.seo}
image={page?.featuredImage?.node?.mediaItemUrl || ''}
/>
<RHHCPageContentNoSSR
page={page}
PageContentLayoutComponent={LandingPageContentLayout}
Expand Down
13 changes: 6 additions & 7 deletions apps/hobbies-helsinki/src/pages/articles/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ const NextCmsArticle: NextPage<{
const { resilientT } = useResilientTranslation();
const { footerMenu } = useContext(NavigationContext);

const { data: categoriesData, loading: loadingCategories } =
useCategoriesQuery({
variables: {
first: CATEGORIES_AMOUNT,
language: getLanguageCodeFilter(currentLanguageCode),
},
});
const { data: categoriesData } = useCategoriesQuery({
variables: {
first: CATEGORIES_AMOUNT,
language: getLanguageCodeFilter(currentLanguageCode),
},
});

const categories = categoriesData?.categories?.nodes ?? [];

Expand Down
5 changes: 5 additions & 0 deletions apps/hobbies-helsinki/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
RouteMeta,
useResilientTranslation,
PreviewNotification,
PageMeta,
} from '@events-helsinki/components';
import { logger } from '@events-helsinki/components/loggers/logger';
import type { GetStaticPropsContext, NextPage } from 'next';
Expand Down Expand Up @@ -57,6 +58,10 @@ const HomePage: NextPage<{
<>
<PreviewNotification token={previewToken} />
<RouteMeta origin={AppConfig.origin} />
<PageMeta
{...page?.seo}
image={page?.featuredImage?.node?.mediaItemUrl || ''}
/>
<RHHCPageContentNoSSR
page={page}
PageContentLayoutComponent={LandingPageContentLayout}
Expand Down
5 changes: 5 additions & 0 deletions apps/sports-helsinki/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
getLanguageOrDefault,
RouteMeta,
PreviewNotification,
PageMeta,
} from '@events-helsinki/components';
import { logger } from '@events-helsinki/components/loggers/logger';
import type { GetStaticPropsContext, NextPage } from 'next';
Expand Down Expand Up @@ -58,6 +59,10 @@ const HomePage: NextPage<{
<>
<PreviewNotification token={previewToken} />
<RouteMeta origin={AppConfig.origin} />
<PageMeta
{...page?.seo}
image={page?.featuredImage?.node?.mediaItemUrl || ''}
/>
<RHHCPageContentNoSSR
page={page}
PageContentLayoutComponent={LandingPageContentLayout}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ function PageMeta({
<>
<Head>
{title && <title>{unescapeDash(title)}</title>}
{description && <meta name="description" content={description} />}
{description && (
<meta name="description" content={unescapeDash(description)} />
)}
<meta property="og:title" content={openGraphTitle || ''} />
<meta name="twitter:card" content="summary_large_image" />
{description && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.loadMoreWrapper {
display: flex;
justify-content: center;

&.buttonCentered {
text-align: center;
}
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ const FooterSection: FunctionComponent<FooterSectionProps> = ({
};

const UserTrackingFeatures = dynamic(
() =>
import('../widgets/UserTrackingFeatures').then((mod) => mod),
() => import('../widgets/UserTrackingFeatures').then((mod) => mod),
{
ssr: false,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useRouter } from 'next/router';
import { useCookieConfigurationContext } from '../../cookieConfigurationProvider';
import { AskemFeedbackContainer, AskemProvider } from '../askem';
import useAskemContext from '../askem/useAskemContext';
import EventsCookieConsent from '../eventsCookieConsent/EventsCookieConsent';
import { useCookieConfigurationContext } from '../../cookieConfigurationProvider';

type UserTrackingFeaturesProps = {
appName: string;
Expand Down

0 comments on commit cf56952

Please sign in to comment.