Skip to content

Commit

Permalink
Merge branch 'main' into 3271-fixing-events-performance
Browse files Browse the repository at this point in the history
  • Loading branch information
amankumarrr authored Oct 30, 2024
2 parents caef435 + de9917c commit db6cb79
Show file tree
Hide file tree
Showing 27 changed files with 72 additions and 115 deletions.
2 changes: 1 addition & 1 deletion app/company/[filename]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { BuiltOnAzure } from "@/components/blocks";
import { Blocks } from "@/components/blocks-renderer";
import { BuiltOnAzure } from "@/components/blocks/builtOnAzure";
import { componentRenderer } from "@/components/blocks/mdxComponentRenderer";
import { TechUpgrade } from "@/components/blocks/techUpgrade";
import HistoryTimeline from "@/components/company/historyTimeline";
Expand Down
2 changes: 1 addition & 1 deletion app/company/clients/[filename]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { BuiltOnAzure } from "@/components/blocks";
import { Blocks } from "@/components/blocks-renderer";
import { BuiltOnAzure } from "@/components/blocks/builtOnAzure";
import { componentRenderer } from "@/components/blocks/mdxComponentRenderer";
import { TechUpgrade } from "@/components/blocks/techUpgrade";
import { Section } from "@/components/util/section";
Expand Down
2 changes: 1 addition & 1 deletion app/company/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { BuiltOnAzure } from "@/components/blocks";
import { BuiltOnAzure } from "@/components/blocks/builtOnAzure";
import { componentRenderer } from "@/components/blocks/mdxComponentRenderer";
import CompanyHeader from "@/components/company/companyHeader";
import CompanyPages from "@/components/company/companyPages";
Expand Down
6 changes: 3 additions & 3 deletions app/consulting/[filename]/consulting.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"use client";

import { BookingButton, BuiltOnAzure, ClientLogos } from "@/components/blocks";
import { Blocks } from "@/components/blocks-renderer";
import { Booking } from "@/components/blocks/booking";
import { BuiltOnAzure } from "@/components/blocks/builtOnAzure";
import { ClientLogos } from "@/components/blocks/clientLogos";
import { componentRenderer } from "@/components/blocks/mdxComponentRenderer";
import { BookingButton } from "@/components/bookingButton/bookingButton";
import { CallToAction } from "@/components/callToAction/callToAction";
import MediaCards from "@/components/consulting/mediaCard/mediaCards";
import { Marketing } from "@/components/marketing/Marketing";
Expand All @@ -15,7 +17,6 @@ import { Section } from "@/components/util/section";
import { sanitiseXSS, spanWhitelist } from "@/helpers/validator";
import { removeExtension } from "@/services/client/utils.service";
import { Breadcrumbs } from "app/components/breadcrumb";

import { ReactElement } from "react";
import ReactDOMServer from "react-dom/server";
import { tinaField } from "tinacms/dist/react";
Expand Down Expand Up @@ -132,7 +133,6 @@ export default function Consulting({ tinaProps, props }) {
></h2>
</CallToAction>
)}

<Section>
<BuiltOnAzure data={{ backgroundColor: "default" }} />
</Section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Section } from "@/components/util/section";
import { Breadcrumbs } from "app/components/breadcrumb";
import { ReactElement } from "react";

import { BuiltOnAzure } from "@/components/blocks";
import { BuiltOnAzure } from "@/components/blocks/builtOnAzure";
import { sanitiseXSS, spanWhitelist } from "@/helpers/validator";
import { removeExtension } from "@/services/client/utils.service";
import ReactDOMServer from "react-dom/server";
Expand Down
2 changes: 1 addition & 1 deletion app/events/[filename]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { ClientLogos } from "@/components/blocks";
import { Blocks } from "@/components/blocks-renderer";
import { ClientLogos } from "@/components/blocks/clientLogos";
import { componentRenderer } from "@/components/blocks/mdxComponentRenderer";
import EventsHeader from "@/components/events/eventsHeader";
import { TestimonialRow } from "@/components/testimonials/TestimonialRow";
Expand Down
3 changes: 2 additions & 1 deletion app/live-steam-banner/liveStreamWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"use client";

import { InlineJotForm, VideoEmbed } from "@/components/blocks";
import { VideoEmbed } from "@/components/blocks/videoEmbed";
import { CustomLink } from "@/components/customLink";
import { InlineJotForm } from "@/components/inlineJotForm/inlineJotForm";
import { SocialIcons } from "@/components/socialIcons/socialIcons";
import layoutData, { default as globals } from "@/content/global/index.json";
import { EventInfo } from "@/services/server/events";
Expand Down
9 changes: 3 additions & 6 deletions components/blocks/clientLogos.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import dynamic from "next/dynamic";
import type { Template } from "tinacms";
import Image from "next/image";
import { Template } from "tinacms";
import layoutData from "../../content/global/index.json";

const Image = dynamic(() => import("next/image"));

const clientsData = layoutData.clients.clientsList;

export const ClientLogos = () => {
Expand All @@ -17,8 +15,7 @@ export const ClientLogos = () => {
alt={client.clientName + " logo"}
height={113}
width={200}
// commented out to test whether this is breaking images on the homepage see #2368
//sizes="20vw"
loading="lazy"
className="max-w-full rounded-lg"
/>
))}
Expand Down
2 changes: 1 addition & 1 deletion components/blocks/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import classNames from "classnames";
import type { Template } from "tinacms";
import { tinaField } from "tinacms/dist/react";
import { TinaMarkdown, TinaMarkdownContent } from "tinacms/dist/rich-text";
import { clientLogosBlockSchema } from "../../components/blocks/clientLogos";
import { Container } from "../util/container";
import { Section } from "../util/section";
import { clientLogosBlockSchema } from "./clientLogos";
import { colorBlockSchema } from "./colorBlock";
import { customImageBlockSchema } from "./customImage";
import { componentRenderer } from "./mdxComponentRenderer";
Expand Down
45 changes: 1 addition & 44 deletions components/blocks/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Template } from "tinacms";

import { clientLogosBlockSchema } from "../../components/blocks/clientLogos";
import { bookingButtonSchema } from "../bookingButton/bookingButton";
import { utilityButtonSchema } from "../button/utilityButton";
import { clientListSchema } from "../company/clientList";
Expand All @@ -22,7 +23,6 @@ import { agendaSchema } from "./agenda";
import { builtOnAzureBlockSchema } from "./builtOnAzure";
import { carouselBlockSchema } from "./carousel";
import { citationBlockSchema } from "./citation";
import { clientLogosBlockSchema } from "./clientLogos";
import { colorBlockSchema } from "./colorBlock";
import { colorPaletteSchema } from "./colorPalette";
import { contentBlockSchema } from "./content";
Expand Down Expand Up @@ -107,46 +107,3 @@ export const pageBlocks: Template[] = [
videoEmbedBlockSchema,
inlineJotFormSchema,
];

export * from "../bookingButton/bookingButton";
export * from "../button/utilityButton";
export * from "../embeds/tweetEmbed";
export * from "../inlineJotForm/inlineJotForm";
export * from "../terms-and-conditions/agreementForm";
export * from "../training/eventBooking";
export * from "../training/presenterBlock";
export * from "../training/trainingInformation";
export * from "../training/trainingLearningOutcome";
export * from "../usergroup/joinAsPresenter";
export * from "../usergroup/joinGithub";
export * from "../usergroup/latestTech";
export * from "../usergroup/organizer";
export * from "./CustomDownloadButton";
export * from "./aboutUs";
export * from "./builtOnAzure";
export * from "./carousel";
export * from "./citation";
export * from "./clientLogos";
export * from "./colorBlock";
export * from "./colorPalette";
export * from "./content";
export * from "./contentCard";
export * from "./customImage";
export * from "./domainFromQuery";
export * from "./dynamicColumns";
export * from "./eventLink";
export * from "./fixedColumns";
export * from "./flag";
export * from "./googleMapsWrapper";
export * from "./hero";
export * from "./jotFormEmbed";
export * from "./newslettersTable";
export * from "./recurringEvent";
export * from "./sectionHeader";
export * from "./serviceCards";
export * from "./tableLayout";
export * from "./testimonialsList";
export * from "./upcomingEvents";
export * from "./verticalImageLayout";
export * from "./verticalListItem";
export * from "./videoEmbed";
6 changes: 4 additions & 2 deletions components/callToAction/callToAction.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { BookingButton } from "../blocks";
import { bookingButtonSchema } from "../bookingButton/bookingButton";
import {
BookingButton,
bookingButtonSchema,
} from "../bookingButton/bookingButton";
import { Container } from "../util/container";
import { Section } from "../util/section";

Expand Down
5 changes: 0 additions & 5 deletions components/customLink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";

import Link from "next/link";
import { usePathname } from "next/navigation";
import React, { PropsWithChildren } from "react";

interface CustomLinkProps extends PropsWithChildren {
Expand Down Expand Up @@ -43,9 +42,6 @@ export const CustomLink: React.FC<CustomLinkProps> = ({
const isExternal = isExternalLink(href);
const isAnSSWBrandedSite = isExternalSSWSite(href) || isTinaSite(href);

const path = usePathname();
const isHomePage = path === "/"; // Check if current page is the homepage

if (!href) return <>{children}</>;
return (
<>
Expand All @@ -69,7 +65,6 @@ export const CustomLink: React.FC<CustomLinkProps> = ({
title={title}
{...props}
style={style}
{...(isHomePage ? { prefetch: false } : {})}
>
{children}
</Link>
Expand Down
2 changes: 1 addition & 1 deletion components/events/interestForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Template } from "tinacms";
import globals from "../../content/global/index.json";
import { JotFormEmbed } from "../blocks";
import { JotFormEmbed } from "../blocks/jotFormEmbed";

export const InterestForm = (props) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/filter/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { TinaMarkdown, TinaMarkdownContent } from "tinacms/dist/rich-text";
import { useEvents } from "../../hooks/useEvents";

import { useFormatDates } from "../../hooks/useFormatDates";
import { UtilityButton } from "../blocks";
import { componentRenderer } from "../blocks/mdxComponentRenderer";
import { UtilityButton } from "../button/utilityButton";
import { CustomLink } from "../customLink";
import { EventsRelativeBox } from "../events/eventsRelativeBox";
import { Presenter, PresenterLinks } from "../presenters/presenterList";
Expand Down
2 changes: 1 addition & 1 deletion components/filter/opportunities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import classNames from "classnames";
import { useEffect, useMemo, useState } from "react";
import { FaMapMarkerAlt } from "react-icons/fa";
import { TinaMarkdown, TinaMarkdownContent } from "tinacms/dist/rich-text";
import { UtilityButton } from "../blocks";
import { componentRenderer } from "../blocks/mdxComponentRenderer";
import { UtilityButton } from "../button/utilityButton";
import {
EmploymentType,
JobStatus,
Expand Down
2 changes: 1 addition & 1 deletion components/layout/footer/pre-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BuiltOnAzure } from "@/components/blocks";
import { BuiltOnAzure } from "@/components/blocks/builtOnAzure";
import { Section } from "@/components/util/section";

export const PreFooter = () => {
Expand Down
3 changes: 2 additions & 1 deletion components/liveStream/liveStreamWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ import layoutData, {
default as globals,
} from "../../content/global/index.json";
import { LiveStreamProps } from "../../hooks/useLiveStreamProps";
import { InlineJotForm, VideoEmbed } from "../blocks";
import { VideoEmbed } from "../blocks/videoEmbed";
import { CustomLink } from "../customLink";
import { InlineJotForm } from "../inlineJotForm/inlineJotForm";
import { SocialIcons } from "../socialIcons/socialIcons";

type LiveStreamWidgetProps = {
Expand Down
2 changes: 1 addition & 1 deletion components/usergroup/sections/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import dayjs from "dayjs";
import Image from "next/image";
import { useMemo } from "react";
import { BiVideo } from "react-icons/bi";
import { UtilityButton } from "../../blocks";
import { UtilityButton } from "../../button/utilityButton";
import { CustomLink } from "../../customLink";
import { CITY_TIMEZONES } from "../../util/constants/country";
import { Container } from "../../util/container";
Expand Down
2 changes: 1 addition & 1 deletion pages/articles/[filename].tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Breadcrumbs } from "@/blocks/breadcrumbs";
import { componentRenderer } from "@/blocks/mdxComponentRenderer";
import ArticleAuthor from "@/components/articles/articleAuthor";
import { BuiltOnAzure } from "@/components/blocks";
import { BuiltOnAzure } from "@/components/blocks/builtOnAzure";
import { CallToAction } from "@/components/callToAction/callToAction";
import { Layout } from "@/components/layout";
import SidebarPanel from "@/components/sidebar/sidebarPanel";
Expand Down
2 changes: 1 addition & 1 deletion pages/employment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { TinaMarkdown } from "tinacms/dist/rich-text";
import { client } from "@/tina/client";
import { TODAY } from "hooks/useFetchEvents";
import { InferGetStaticPropsType } from "next";
import { BuiltOnAzure } from "../../components/blocks";
import { Booking } from "../../components/blocks/booking";
import { Breadcrumbs } from "../../components/blocks/breadcrumbs";
import { BuiltOnAzure } from "../../components/blocks/builtOnAzure";
import { componentRenderer } from "../../components/blocks/mdxComponentRenderer";
import {
Opportunities,
Expand Down
2 changes: 1 addition & 1 deletion pages/industry/[filename].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { InferGetStaticPropsType } from "next";
import Image from "next/image";
import { tinaField, useTina } from "tinacms/dist/react";
import { TinaMarkdown } from "tinacms/dist/rich-text";
import { BuiltOnAzure } from "../../components/blocks";
import { Breadcrumbs } from "../../components/blocks/breadcrumbs";
import { BuiltOnAzure } from "../../components/blocks/builtOnAzure";
import {
DownloadWhitepaperLink,
industryRenderer,
Expand Down
15 changes: 7 additions & 8 deletions pages/netug/[[...filename]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import { InferGetStaticPropsType } from "next";
import ReactDomServer from "react-dom/server";
import { tinaField, useTina } from "tinacms/dist/react";
import { TinaMarkdown } from "tinacms/dist/rich-text";
import {
BuiltOnAzure,
GoogleMapsWrapper,
JoinAsPresenter,
JoinGithub,
LatestTech,
Organizer,
} from "../../components/blocks";

import { GoogleMapsWrapper } from "@/components/blocks/googleMapsWrapper";
import { JoinAsPresenter } from "@/components/usergroup/joinAsPresenter";
import { JoinGithub } from "@/components/usergroup/joinGithub";
import { LatestTech } from "@/components/usergroup/latestTech";
import { Organizer } from "@/components/usergroup/organizer";
import { Breadcrumbs } from "../../components/blocks/breadcrumbs";
import { BuiltOnAzure } from "../../components/blocks/builtOnAzure";
import { componentRenderer } from "../../components/blocks/mdxComponentRenderer";
import { Layout } from "../../components/layout";
import { TestimonialRow } from "../../components/testimonials/TestimonialRow";
Expand Down
2 changes: 1 addition & 1 deletion pages/offices/[filename].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { TinaMarkdown } from "tinacms/dist/rich-text";

import { TODAY } from "hooks/useFetchEvents";
import { InferGetStaticPropsType } from "next";
import { BuiltOnAzure } from "../../components/blocks";
import { Breadcrumbs } from "../../components/blocks/breadcrumbs";
import { BuiltOnAzure } from "../../components/blocks/builtOnAzure";
import { componentRenderer } from "../../components/blocks/mdxComponentRenderer";
import { CustomLink } from "../../components/customLink";
import { Layout } from "../../components/layout";
Expand Down
2 changes: 1 addition & 1 deletion pages/training/[filename].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { client } from "@/tina/client";
import { TODAY } from "hooks/useFetchEvents";
import { InferGetStaticPropsType } from "next";
import { TinaMarkdown } from "tinacms/dist/rich-text";
import { ClientLogos } from "../../components/blocks";
import { Blocks } from "../../components/blocks-renderer";
import { Breadcrumbs } from "../../components/blocks/breadcrumbs";
import { ClientLogos } from "../../components/blocks/clientLogos";
import { componentRenderer } from "../../components/blocks/mdxComponentRenderer";
import { Layout } from "../../components/layout";
import { TestimonialRow } from "../../components/testimonials/TestimonialRow";
Expand Down
26 changes: 13 additions & 13 deletions tina/collections/articles.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type { Collection } from "tinacms";
import * as Schemas from "../../components/blocks";
import {
carouselBlockSchema,
colorBlockSchema,
colorPaletteSchema,
customDownloadButtonSchema,
fixedColumnsSchema,
sectionHeaderSchema,
tableBlockSchema,
testimonialsListSchema,
verticalImageLayoutBlockSchema,
} from "../../components/blocks";
import { carouselBlockSchema } from "../../components/blocks/carousel";
import { colorBlockSchema } from "../../components/blocks/colorBlock";
import { colorPaletteSchema } from "../../components/blocks/colorPalette";
import { customDownloadButtonSchema } from "../../components/blocks/CustomDownloadButton";
import { customImageBlockSchema } from "../../components/blocks/customImage";
import { dynamicCardGridBlockSchema } from "../../components/blocks/dynamicCardGridBlock";
import { fixedColumnsSchema } from "../../components/blocks/fixedColumns";
import { sectionHeaderSchema } from "../../components/blocks/sectionHeader";
import { tableBlockSchema } from "../../components/blocks/tableLayout";
import { testimonialsListSchema } from "../../components/blocks/testimonialsList";
import { verticalImageLayoutBlockSchema } from "../../components/blocks/verticalImageLayout";
import { videoEmbedBlockSchema } from "../../components/blocks/videoEmbed";
import { utilityButtonSchema } from "../../components/button/utilityButton";
import {
callToActionDefaults,
callToActionSchema,
Expand Down Expand Up @@ -97,13 +97,13 @@ export const articlesSchema: Collection = {
colorBlockSchema,
colorPaletteSchema,
customDownloadButtonSchema,
Schemas.customImageBlockSchema,
customImageBlockSchema,
dynamicCardGridBlockSchema,
fixedColumnsSchema,
sectionHeaderSchema,
tableBlockSchema,
testimonialsListSchema,
Schemas.utilityButtonSchema,
utilityButtonSchema,
verticalImageLayoutBlockSchema,
videoEmbedBlockSchema,
],
Expand Down
Loading

0 comments on commit db6cb79

Please sign in to comment.