Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into wip/new-infra
Browse files Browse the repository at this point in the history
  • Loading branch information
juyrjola committed Oct 14, 2024
2 parents 60e3bd2 + 0de6409 commit 030c390
Show file tree
Hide file tree
Showing 62 changed files with 7,535 additions and 5,656 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
'use client';

import React from 'react';
import { Container, Row, Col } from 'reactstrap';
import { useTheme } from 'styled-components';

import { GetContentPageQuery } from 'common/__generated__/graphql';
import { getBgImageAlignment } from 'common/images';
import CategoryPageContent from 'components/categories/CategoryPageContent';
import RichText from 'components/common/RichText';
import SecondaryNavigation from 'components/common/SecondaryNavigation';
import StreamField from 'components/common/StreamField';
import { getBgImageAlignment } from 'common/images';
import CategoryPageHeaderBlock from 'components/contentblocks/CategoryPageHeaderBlock';
import ContentPageHeaderBlock from 'components/contentblocks/ContentPageHeaderBlock';
import SecondaryNavigation from 'components/common/SecondaryNavigation';
import { GetContentPageQuery } from 'common/__generated__/graphql';
import CategoryPageContent from 'components/categories/CategoryPageContent';
import { Col, Container, Row } from 'reactstrap';
import { useTheme } from 'styled-components';

export type GeneralPlanPage = NonNullable<GetContentPageQuery['planPage']>;

type PageHeaderBlockProps = {
page: GeneralPlanPage;
color?: string | null;
color?: string | false | null | undefined;
};

const PageHeaderBlock = ({ color, page }: PageHeaderBlockProps) => {
Expand Down Expand Up @@ -83,14 +84,14 @@ export const Content = ({ page }: { page: GeneralPlanPage }) => {
// Restrict the secondary nav to be shown on StaticPages only currently
const siblings =
hasSecondaryNav && page.__typename === 'StaticPage'
? page?.parent?.children ?? []
? (page?.parent?.children ?? [])
: [];

return (
<article>
<PageHeaderBlock
page={page}
color={isCategoryPage ? pageSectionColor : undefined}
color={isCategoryPage ? categoryColor : undefined}
/>

{isCategoryPage ? (
Expand Down
2 changes: 1 addition & 1 deletion app/[domain]/[lang]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from 'react';
import { NextIntlClientProvider, useMessages } from 'next-intl';

import 'react-medium-image-zoom/dist/styles.css';
import { StyledComponentsRegistry } from '@/styles/StyledComponentsRegistry';
import { ApolloWrapper } from '@/components/providers/ApolloWrapper';
import ThemeProvider from '@/components/providers/ThemeProvider';
Expand Down
Loading

0 comments on commit 030c390

Please sign in to comment.