From 255255022dd84b217ece18229d24b91d2e51a5c9 Mon Sep 17 00:00:00 2001 From: "Aman Kumar [SSW]" <71385247+amankumarrr@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:31:03 +1100 Subject: [PATCH] Fixing the imports for all of the pages --- app/company/[filename]/index.tsx | 2 +- app/company/clients/[filename]/index.tsx | 2 +- app/company/index.tsx | 2 +- .../[filename]/video-production.tsx | 2 +- app/live-steam-banner/liveStreamWidget.tsx | 3 +- components/blocks/index.ts | 43 ------------------- components/events/interestForm.tsx | 2 +- components/filter/events.tsx | 4 +- components/filter/opportunities.tsx | 2 +- components/layout/footer/pre-footer.tsx | 2 +- components/liveStream/liveStreamWidget.tsx | 3 +- components/usergroup/sections/header.tsx | 2 +- pages/articles/[filename].tsx | 2 +- pages/employment/index.tsx | 2 +- pages/events/[filename].tsx | 2 +- pages/industry/[filename].tsx | 2 +- pages/netug/[[...filename]].tsx | 15 +++---- pages/offices/[filename].tsx | 2 +- pages/training/[filename].tsx | 2 +- tina/collections/articles.tsx | 26 +++++------ tina/collections/company.tsx | 28 ++++++------ tina/collections/usergroup.tsx | 9 ++-- 22 files changed, 61 insertions(+), 98 deletions(-) diff --git a/app/company/[filename]/index.tsx b/app/company/[filename]/index.tsx index c40a21a3f4..231906b2ed 100644 --- a/app/company/[filename]/index.tsx +++ b/app/company/[filename]/index.tsx @@ -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"; diff --git a/app/company/clients/[filename]/index.tsx b/app/company/clients/[filename]/index.tsx index 654d7b49ba..35cb0bd911 100644 --- a/app/company/clients/[filename]/index.tsx +++ b/app/company/clients/[filename]/index.tsx @@ -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"; diff --git a/app/company/index.tsx b/app/company/index.tsx index 59eda8ab75..d7a21d95b1 100644 --- a/app/company/index.tsx +++ b/app/company/index.tsx @@ -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"; diff --git a/app/consulting/video-production/[filename]/video-production.tsx b/app/consulting/video-production/[filename]/video-production.tsx index b206353730..32e4c7e1a8 100644 --- a/app/consulting/video-production/[filename]/video-production.tsx +++ b/app/consulting/video-production/[filename]/video-production.tsx @@ -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"; diff --git a/app/live-steam-banner/liveStreamWidget.tsx b/app/live-steam-banner/liveStreamWidget.tsx index 9594ed52d4..b40c5a4469 100644 --- a/app/live-steam-banner/liveStreamWidget.tsx +++ b/app/live-steam-banner/liveStreamWidget.tsx @@ -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"; diff --git a/components/blocks/index.ts b/components/blocks/index.ts index 7697553aff..cc9e275beb 100644 --- a/components/blocks/index.ts +++ b/components/blocks/index.ts @@ -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"; diff --git a/components/events/interestForm.tsx b/components/events/interestForm.tsx index 97b02a919a..464013854e 100644 --- a/components/events/interestForm.tsx +++ b/components/events/interestForm.tsx @@ -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 ( diff --git a/components/filter/events.tsx b/components/filter/events.tsx index eb2c25f5a3..2ff65c3eb7 100644 --- a/components/filter/events.tsx +++ b/components/filter/events.tsx @@ -17,8 +17,8 @@ import { useFetchPastEvents, } from "../../hooks/useFetchEvents"; 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"; @@ -295,7 +295,7 @@ const Event = ({ visible, event, jsonLd }: EventProps) => { We need this because there's an issue preventing us from syncing the files in the repo to Tina cloud. Images that aren't synced will 404. - + */ const [thumbnail, setFallbackImage] = useState(""); diff --git a/components/filter/opportunities.tsx b/components/filter/opportunities.tsx index 140870c76c..54b57f474f 100644 --- a/components/filter/opportunities.tsx +++ b/components/filter/opportunities.tsx @@ -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, diff --git a/components/layout/footer/pre-footer.tsx b/components/layout/footer/pre-footer.tsx index 07cfe85490..c266f21221 100644 --- a/components/layout/footer/pre-footer.tsx +++ b/components/layout/footer/pre-footer.tsx @@ -1,4 +1,4 @@ -import { BuiltOnAzure } from "@/components/blocks"; +import { BuiltOnAzure } from "@/components/blocks/builtOnAzure"; import { Section } from "@/components/util/section"; export const PreFooter = () => { diff --git a/components/liveStream/liveStreamWidget.tsx b/components/liveStream/liveStreamWidget.tsx index 8cb7230cdf..3dd656a4e3 100644 --- a/components/liveStream/liveStreamWidget.tsx +++ b/components/liveStream/liveStreamWidget.tsx @@ -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 = { diff --git a/components/usergroup/sections/header.tsx b/components/usergroup/sections/header.tsx index b96f0871fb..7aa0f87cdc 100644 --- a/components/usergroup/sections/header.tsx +++ b/components/usergroup/sections/header.tsx @@ -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"; diff --git a/pages/articles/[filename].tsx b/pages/articles/[filename].tsx index 17bd95ceb9..6323c74b47 100644 --- a/pages/articles/[filename].tsx +++ b/pages/articles/[filename].tsx @@ -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"; diff --git a/pages/employment/index.tsx b/pages/employment/index.tsx index 3bfb2ba337..c751bbf002 100644 --- a/pages/employment/index.tsx +++ b/pages/employment/index.tsx @@ -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, diff --git a/pages/events/[filename].tsx b/pages/events/[filename].tsx index 956b4c1d13..6d53f53e10 100644 --- a/pages/events/[filename].tsx +++ b/pages/events/[filename].tsx @@ -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 EventsHeader from "../../components/events/eventsHeader"; import { Layout } from "../../components/layout"; diff --git a/pages/industry/[filename].tsx b/pages/industry/[filename].tsx index 87cee6f9bc..eb6c4ef005 100644 --- a/pages/industry/[filename].tsx +++ b/pages/industry/[filename].tsx @@ -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, diff --git a/pages/netug/[[...filename]].tsx b/pages/netug/[[...filename]].tsx index 4770d2e6c9..840da91342 100644 --- a/pages/netug/[[...filename]].tsx +++ b/pages/netug/[[...filename]].tsx @@ -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"; diff --git a/pages/offices/[filename].tsx b/pages/offices/[filename].tsx index d2b7b62e2a..174ac0537f 100644 --- a/pages/offices/[filename].tsx +++ b/pages/offices/[filename].tsx @@ -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"; diff --git a/pages/training/[filename].tsx b/pages/training/[filename].tsx index b82d8fea77..eb69d4ad70 100644 --- a/pages/training/[filename].tsx +++ b/pages/training/[filename].tsx @@ -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"; diff --git a/tina/collections/articles.tsx b/tina/collections/articles.tsx index f531b9822a..86d15245e7 100644 --- a/tina/collections/articles.tsx +++ b/tina/collections/articles.tsx @@ -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, @@ -97,13 +97,13 @@ export const articlesSchema: Collection = { colorBlockSchema, colorPaletteSchema, customDownloadButtonSchema, - Schemas.customImageBlockSchema, + customImageBlockSchema, dynamicCardGridBlockSchema, fixedColumnsSchema, sectionHeaderSchema, tableBlockSchema, testimonialsListSchema, - Schemas.utilityButtonSchema, + utilityButtonSchema, verticalImageLayoutBlockSchema, videoEmbedBlockSchema, ], diff --git a/tina/collections/company.tsx b/tina/collections/company.tsx index ef4b6f67f4..e01161079e 100644 --- a/tina/collections/company.tsx +++ b/tina/collections/company.tsx @@ -1,22 +1,24 @@ 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 { 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 { microsoftPanelSchema } from "../../components/offices/microsoftPanel"; import { seoSchema } from "../../components/util/seo"; import { tipField } from "./shared-fields"; import type { Collection } from "tinacms"; +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 { utilityButtonSchema } from "../../components/button/utilityButton"; import { testimonialToSelectOptions } from "../../helpers/getTestimonials"; export const companySchema: Collection = { @@ -61,13 +63,13 @@ export const companySchema: Collection = { colorBlockSchema, colorPaletteSchema, customDownloadButtonSchema, - Schemas.customImageBlockSchema, + customImageBlockSchema, dynamicCardGridBlockSchema, fixedColumnsSchema, sectionHeaderSchema, tableBlockSchema, testimonialsListSchema, - Schemas.utilityButtonSchema, + utilityButtonSchema, verticalImageLayoutBlockSchema, videoEmbedBlockSchema, ], diff --git a/tina/collections/usergroup.tsx b/tina/collections/usergroup.tsx index c8eba061d9..69c4ed8de9 100644 --- a/tina/collections/usergroup.tsx +++ b/tina/collections/usergroup.tsx @@ -1,9 +1,12 @@ import * as Schemas from "../../components/blocks"; +import { joinGithubSchema } from "../../components/usergroup/joinGithub"; import { pageBlocks as sectionPageBlocks } from "../../components/usergroup/sections"; import { seoSchema } from "../../components/util/seo"; import type { Collection } from "tinacms"; import { youtubePlaylistSchema } from "../../components/blocks/youtubePlaylist"; +import { joinAsPresenterSchema } from "../../components/usergroup/joinAsPresenter"; +import { latestTechSchema } from "../../components/usergroup/latestTech"; import { tipField } from "./shared-fields"; export const userGroupPageSchema: Collection = { @@ -44,7 +47,7 @@ export const userGroupPageSchema: Collection = { type: "object", label: "Join GitHub Panel", name: "joinGithub", - fields: Schemas.joinGithubSchema.fields, + fields: joinGithubSchema.fields, }, { type: "object", @@ -125,7 +128,7 @@ export const userGroupPageSchema: Collection = { type: "object", label: "Latest Tech", name: "latestTech", - fields: Schemas.latestTechSchema.fields, + fields: latestTechSchema.fields, }, { type: "object", @@ -256,7 +259,7 @@ export const userGroupGlobalSchema: Collection = { type: "object", label: "Join Us Panel", name: "joinUs", - fields: Schemas.joinAsPresenterSchema.fields, + fields: joinAsPresenterSchema.fields, }, { type: "object",