diff --git a/README.md b/README.md index b32f0684f..ba59863fd 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ The `Company Information` menu allows you to configure global settings for your ### Pages - **Creating Pages**: Content editors can create and manage pages under the `Pages` menu in the Sanity Studio. -- **Adding Sections**: Each page can be customized with structured content that includes various predefined sections such as hero, article, testimonials, features, callToAction, grid, and callout. +- **Adding Sections**: Each page can be customized with structured content that includes various predefined sections such as hero, article, testimonials, features, callToAction, grid, and callout.s ## Development Workflow @@ -132,7 +132,7 @@ To maintain consistency and efficiency, follow these steps when working on the p 2. Adding New UI with Content: - Define the Sanity schema for new content types. - - Implement the corresponding interface and payload structure in src/lib/payloads. + - Implement the corresponding interface and payload structure in src/lib/interfaces. - Fetch the necessary data and create the UI component. - Document and test the UI component in Storybook, using mock data for isolated development. diff --git a/src/app/(main)/[slug]/[id]/page.tsx b/src/app/(main)/[slug]/[id]/page.tsx index f08192812..9e4f682b8 100644 --- a/src/app/(main)/[slug]/[id]/page.tsx +++ b/src/app/(main)/[slug]/[id]/page.tsx @@ -4,7 +4,7 @@ import PostPage from "src/post/PostPage"; import PostPagePreview from "src/post/PostPagePreview"; import { getDraftModeInfo } from "src/utils/draftmode"; import { fetchPostSeoData, generateMetadataFromSeo } from "src/utils/seo"; -import { BlogPage, Post } from "studio/lib/payloads/pages"; +import { BlogPage, Post } from "studio/lib/interfaces/pages"; import { BLOG_PAGE_QUERY, MORE_POST_PREVIEW, diff --git a/src/app/(main)/[slug]/page.tsx b/src/app/(main)/[slug]/page.tsx index dfe51b3cf..404981307 100644 --- a/src/app/(main)/[slug]/page.tsx +++ b/src/app/(main)/[slug]/page.tsx @@ -5,8 +5,8 @@ import Compensations from "src/compensations/Compensations"; import { getDraftModeInfo } from "src/utils/draftmode"; import SectionRenderer from "src/utils/renderSection"; import { fetchSeoData, generateMetadataFromSeo } from "src/utils/seo"; -import { BlogPage, PageBuilder, Post } from "studio/lib/payloads/pages"; -import { CompensationsPage } from "studio/lib/payloads/compensations"; +import { BlogPage, PageBuilder, Post } from "studio/lib/interfaces/pages"; +import { CompensationsPage } from "studio/lib/interfaces/compensations"; import { BLOG_PAGE_QUERY, POSTS_QUERY, @@ -18,7 +18,7 @@ import { loadQuery } from "studio/lib/store"; import CompensationsPreview from "src/compensations/CompensationsPreview"; import { homeLink } from "../../../blog/components/utils/linkTypes"; import CustomErrorMessage from "../../../blog/components/customErrorMessage/CustomErrorMessage"; -import { CompanyLocation } from "studio/lib/payloads/companyDetails"; +import { CompanyLocation } from "studio/lib/interfaces/companyDetails"; import { COMPANY_LOCATIONS_QUERY } from "studio/lib/queries/companyDetails"; export const dynamic = "force-dynamic"; diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx index 2d185883b..9aaec3ac7 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/layout.tsx @@ -2,20 +2,20 @@ import Footer from "src/components/navigation/footer/Footer"; import { NAV_QUERY } from "studio/lib/queries/navigation"; import { COMPANY_INFO_QUERY } from "studio/lib/queries/companyDetails"; import { Header } from "src/components/navigation/header/Header"; -import { Navigation } from "studio/lib/payloads/navigation"; -import { CompanyInfo } from "studio/lib/payloads/companyDetails"; +import { Navigation } from "studio/lib/interfaces/navigation"; +import { CompanyInfo } from "studio/lib/interfaces/companyDetails"; import { loadQuery } from "studio/lib/store"; import HeaderPreview from "src/components/navigation/header/HeaderPreview"; import FooterPreview from "src/components/navigation/footer/FooterPreview"; import { SOMEPROFILES_QUERY } from "studio/lib/queries/socialMediaProfiles"; -import { SocialMediaProfiles } from "studio/lib/payloads/socialMedia"; +import { SocialMediaProfiles } from "studio/lib/interfaces/socialMedia"; import { getDraftModeInfo } from "src/utils/draftmode"; import SkipToMain from "src/components/skipToMain/SkipToMain"; import { LEGAL_DOCUMENTS_QUERY } from "studio/lib/queries/legalDocuments"; -import { LegalDocument } from "studio/lib/payloads/legalDocuments"; +import { LegalDocument } from "studio/lib/interfaces/legalDocuments"; import styles from "./layout.module.css"; import { BRAND_ASSETS_QUERY } from "../../../studio/lib/queries/brandAssets"; -import { BrandAssets } from "../../../studio/lib/payloads/brandAssets"; +import { BrandAssets } from "../../../studio/lib/interfaces/brandAssets"; const hasValidData = (data: any) => data && Object.keys(data).length > 0; diff --git a/src/app/(main)/legal/[id]/page.tsx b/src/app/(main)/legal/[id]/page.tsx index 4929a0321..e512ea7a0 100644 --- a/src/app/(main)/legal/[id]/page.tsx +++ b/src/app/(main)/legal/[id]/page.tsx @@ -1,7 +1,7 @@ import Legal from "src/blog/components/legal/Legal"; import LegalPreview from "src/blog/components/legal/LegalPreview"; import { getDraftModeInfo } from "src/utils/draftmode"; -import { LegalDocument } from "studio/lib/payloads/legalDocuments"; +import { LegalDocument } from "studio/lib/interfaces/legalDocuments"; import { LEGAL_DOCUMENT_SLUG_QUERY } from "studio/lib/queries/legalDocuments"; import { loadQuery } from "studio/lib/store"; diff --git a/src/app/(main)/page.tsx b/src/app/(main)/page.tsx index 91537a58b..dd98034ba 100644 --- a/src/app/(main)/page.tsx +++ b/src/app/(main)/page.tsx @@ -1,13 +1,13 @@ import { getDraftModeInfo } from "src/utils/draftmode"; import { LANDING_QUERY } from "studio/lib/queries/navigation"; import { PAGE_QUERY, SEO_PAGE_QUERY } from "studio/lib/queries/pages"; -import { PageBuilder } from "studio/lib/payloads/pages"; +import { PageBuilder } from "studio/lib/interfaces/pages"; import SectionRenderer from "src/utils/renderSection"; import { loadQuery } from "studio/lib/store"; import { Metadata } from "next"; import { fetchSeoData, generateMetadataFromSeo } from "src/utils/seo"; import InformationSection from "src/blog/components/informationSection/InformationSection"; -import { LinkType } from "studio/lib/payloads/navigation"; +import { LinkType } from "studio/lib/interfaces/navigation"; export async function generateMetadata(): Promise { const { data: landingId } = await loadQuery(LANDING_QUERY); diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index 680c50c15..2f4cb1240 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -1,6 +1,6 @@ import type { MetadataRoute } from "next"; import { client } from "../../studio/lib/client"; -import { Slug } from "../../studio/lib/payloads/global"; +import { Slug } from "../../studio/lib/interfaces/global"; import { token } from "../../studio/lib/token"; interface SitemapDocument { diff --git a/src/blog/Blog.tsx b/src/blog/Blog.tsx index 125ce695c..d6dc23c04 100644 --- a/src/blog/Blog.tsx +++ b/src/blog/Blog.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect, useCallback } from "react"; import useTabs from "src/utils/hooks/useTabs"; -import { BlogPage, Post } from "studio/lib/payloads/pages"; +import { BlogPage, Post } from "studio/lib/interfaces/pages"; import styles from "./blog.module.css"; import { useFetchPosts } from "src/utils/hooks/useFetchPosts"; import BlogHero from "./components/hero/BlogHero"; diff --git a/src/blog/BlogPreview.tsx b/src/blog/BlogPreview.tsx index a16e8e7ec..aa1eb7345 100644 --- a/src/blog/BlogPreview.tsx +++ b/src/blog/BlogPreview.tsx @@ -1,6 +1,6 @@ "use client"; import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; -import { BlogPage, Post } from "studio/lib/payloads/pages"; +import { BlogPage, Post } from "studio/lib/interfaces/pages"; import { BLOG_PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { Blog } from "./Blog"; diff --git a/src/blog/components/customErrorMessage/CustomErrorMessage.tsx b/src/blog/components/customErrorMessage/CustomErrorMessage.tsx index 2c3883102..adf820ab1 100644 --- a/src/blog/components/customErrorMessage/CustomErrorMessage.tsx +++ b/src/blog/components/customErrorMessage/CustomErrorMessage.tsx @@ -1,7 +1,7 @@ import Button from "src/components/buttons/Button"; import LinkButton from "src/components/linkButton/LinkButton"; import Text from "src/components/text/Text"; -import { ILink } from "studio/lib/payloads/navigation"; +import { ILink } from "studio/lib/interfaces/navigation"; import styles from "./customErrorMessage.module.css"; interface CustomErrorMessageProps { diff --git a/src/blog/components/hero/BlogHero.tsx b/src/blog/components/hero/BlogHero.tsx index 184568255..e7ed50425 100644 --- a/src/blog/components/hero/BlogHero.tsx +++ b/src/blog/components/hero/BlogHero.tsx @@ -1,6 +1,6 @@ import Text from "src/components/text/Text"; import styles from "./blogHero.module.css"; -import { Category } from "studio/lib/payloads/pages"; +import { Category } from "studio/lib/interfaces/pages"; import { LegacyRef } from "react"; const BlogHero = ({ diff --git a/src/blog/components/informationSection/InformationSection.tsx b/src/blog/components/informationSection/InformationSection.tsx index ca63836cb..112cce3a8 100644 --- a/src/blog/components/informationSection/InformationSection.tsx +++ b/src/blog/components/informationSection/InformationSection.tsx @@ -1,6 +1,6 @@ import LinkButton from "src/components/linkButton/LinkButton"; import Text from "src/components/text/Text"; -import { ILink } from "studio/lib/payloads/navigation"; +import { ILink } from "studio/lib/interfaces/navigation"; import styles from "./informationSection.module.css"; import React from "react"; diff --git a/src/blog/components/legal/Legal.tsx b/src/blog/components/legal/Legal.tsx index 652812257..25b866275 100644 --- a/src/blog/components/legal/Legal.tsx +++ b/src/blog/components/legal/Legal.tsx @@ -1,6 +1,6 @@ import Text from "src/components/text/Text"; import styles from "./legal.module.css"; -import { LegalDocument } from "studio/lib/payloads/legalDocuments"; +import { LegalDocument } from "studio/lib/interfaces/legalDocuments"; import { RichText, PortableTextBlock } from "src/components/richText/RichText"; import Link from "next/link"; diff --git a/src/blog/components/legal/LegalPreview.tsx b/src/blog/components/legal/LegalPreview.tsx index a1b8c11ec..4dd469101 100644 --- a/src/blog/components/legal/LegalPreview.tsx +++ b/src/blog/components/legal/LegalPreview.tsx @@ -1,7 +1,7 @@ "use client"; import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; import { NAV_QUERY } from "studio/lib/queries/navigation"; -import { LegalDocument } from "studio/lib/payloads/legalDocuments"; +import { LegalDocument } from "studio/lib/interfaces/legalDocuments"; import Legal from "./Legal"; export default function LegalPreview({ diff --git a/src/blog/components/postCard/PostCard.tsx b/src/blog/components/postCard/PostCard.tsx index 95bc6b74f..77c78fa70 100644 --- a/src/blog/components/postCard/PostCard.tsx +++ b/src/blog/components/postCard/PostCard.tsx @@ -1,7 +1,7 @@ "use client"; import Text from "src/components/text/Text"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; -import { Post } from "studio/lib/payloads/pages"; +import { Post } from "studio/lib/interfaces/pages"; import styles from "./postCard.module.css"; export const PostCard = ({ diff --git a/src/blog/components/postPreview/PostPreview.tsx b/src/blog/components/postPreview/PostPreview.tsx index c2436b3f3..5b61b7c84 100644 --- a/src/blog/components/postPreview/PostPreview.tsx +++ b/src/blog/components/postPreview/PostPreview.tsx @@ -1,10 +1,10 @@ "use client"; import { RichText, PortableTextBlock } from "src/components/richText/RichText"; import Text from "src/components/text/Text"; -import { Post } from "studio/lib/payloads/pages"; +import { Post } from "studio/lib/interfaces/pages"; import styles from "./postPreview.module.css"; import CustomLink from "src/components/link/CustomLink"; -import { LinkType } from "studio/lib/payloads/navigation"; +import { LinkType } from "studio/lib/interfaces/navigation"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; export interface PostPreviewProps { diff --git a/src/blog/components/postPreviewGrid/PostPreviewGrid.tsx b/src/blog/components/postPreviewGrid/PostPreviewGrid.tsx index bbc2950d7..fb3b223bc 100644 --- a/src/blog/components/postPreviewGrid/PostPreviewGrid.tsx +++ b/src/blog/components/postPreviewGrid/PostPreviewGrid.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState, useCallback } from "react"; import Text from "src/components/text/Text"; -import { Post } from "studio/lib/payloads/pages"; +import { Post } from "studio/lib/interfaces/pages"; import styles from "./postPreviewGrid.module.css"; import Button from "src/components/buttons/Button"; import { PostCard } from "../postCard/PostCard"; diff --git a/src/blog/components/utils/linkTypes.ts b/src/blog/components/utils/linkTypes.ts index 9c26c81ce..e5623d261 100644 --- a/src/blog/components/utils/linkTypes.ts +++ b/src/blog/components/utils/linkTypes.ts @@ -1,4 +1,4 @@ -import { LinkType } from "studio/lib/payloads/navigation"; +import { LinkType } from "studio/lib/interfaces/navigation"; export const homeLink = { _key: "return-home", diff --git a/src/compensations/Compensations.tsx b/src/compensations/Compensations.tsx index a2256c751..9daedd7df 100644 --- a/src/compensations/Compensations.tsx +++ b/src/compensations/Compensations.tsx @@ -1,7 +1,7 @@ "use client"; import styles from "./compensations.module.css"; import Text from "src/components/text/Text"; -import { CompensationsPage } from "studio/lib/payloads/compensations"; +import { CompensationsPage } from "studio/lib/interfaces/compensations"; import SalaryCalculator, { Degree, } from "./components/salaryCalculator/SalaryCalculator"; @@ -13,7 +13,7 @@ import { minSalariesExaminationYear, salariesFromLocation, } from "./utils/salary"; -import { CompanyLocation } from "studio/lib/payloads/companyDetails"; +import { CompanyLocation } from "studio/lib/interfaces/companyDetails"; import { IOption, RadioButtonGroup, diff --git a/src/compensations/CompensationsPreview.tsx b/src/compensations/CompensationsPreview.tsx index 5a592e6d3..43e0eeac4 100644 --- a/src/compensations/CompensationsPreview.tsx +++ b/src/compensations/CompensationsPreview.tsx @@ -2,8 +2,8 @@ import { Suspense } from "react"; import Compensations from "./Compensations"; import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; -import { CompensationsPage } from "studio/lib/payloads/compensations"; -import { CompanyLocation } from "studio/lib/payloads/companyDetails"; +import { CompensationsPage } from "studio/lib/interfaces/compensations"; +import { CompanyLocation } from "studio/lib/interfaces/companyDetails"; import { COMPANY_LOCATIONS_QUERY } from "studio/lib/queries/companyDetails"; import { COMPENSATIONS_PAGE_QUERY } from "studio/lib/queries/pages"; diff --git a/src/compensations/components/benefitsByLocation/BenefitsByLocation.tsx b/src/compensations/components/benefitsByLocation/BenefitsByLocation.tsx index b1d862dd4..b2d1b1517 100644 --- a/src/compensations/components/benefitsByLocation/BenefitsByLocation.tsx +++ b/src/compensations/components/benefitsByLocation/BenefitsByLocation.tsx @@ -1,7 +1,7 @@ import Text from "src/components/text/Text"; import { RichText } from "src/components/richText/RichText"; import styles from "./benefitsByLocation.module.css"; -import { Benefit } from "studio/lib/payloads/compensations"; +import { Benefit } from "studio/lib/interfaces/compensations"; interface BenefitsByLocationProps { benefits: Benefit[]; diff --git a/src/compensations/components/yearlyBonuses/YearlyBonuses.tsx b/src/compensations/components/yearlyBonuses/YearlyBonuses.tsx index 78c65167f..25904a668 100644 --- a/src/compensations/components/yearlyBonuses/YearlyBonuses.tsx +++ b/src/compensations/components/yearlyBonuses/YearlyBonuses.tsx @@ -1,4 +1,4 @@ -import { BonusPage } from "studio/lib/payloads/compensations"; +import { BonusPage } from "studio/lib/interfaces/compensations"; import Text from "../../../components/text/Text"; import styles from "./yearlyBonuses.module.css"; diff --git a/src/compensations/utils/salary.ts b/src/compensations/utils/salary.ts index 92c6d3e9d..0259eb3ff 100644 --- a/src/compensations/utils/salary.ts +++ b/src/compensations/utils/salary.ts @@ -2,7 +2,7 @@ import { isSalariesType, Salaries, } from "studio/components/salariesInput/utils/parseSalaries"; -import { SalariesByLocation } from "../../../studio/lib/payloads/compensations"; +import { SalariesByLocation } from "../../../studio/lib/interfaces/compensations"; import { Result, ResultError, ResultOk } from "../../../studio/utils/result"; export function calculateSalary( diff --git a/src/components/link/CustomLink.stories.tsx b/src/components/link/CustomLink.stories.tsx index 856cf24a7..078971359 100644 --- a/src/components/link/CustomLink.stories.tsx +++ b/src/components/link/CustomLink.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react"; import CustomLink from "./CustomLink"; -import { LinkType } from "studio/lib/payloads/navigation"; +import { LinkType } from "studio/lib/interfaces/navigation"; const meta: Meta = { title: "Components/Links/CustomLink", diff --git a/src/components/link/CustomLink.tsx b/src/components/link/CustomLink.tsx index 1ed4bf2bd..1c9724706 100644 --- a/src/components/link/CustomLink.tsx +++ b/src/components/link/CustomLink.tsx @@ -1,7 +1,7 @@ import React from "react"; import styles from "./link.module.css"; import Link from "next/link"; -import { ILink } from "studio/lib/payloads/navigation"; +import { ILink } from "studio/lib/interfaces/navigation"; import { getHref } from "src/utils/get"; type ComponentLinkType = "link" | "headerLink" | "footerLink"; diff --git a/src/components/link/SoMeLink.tsx b/src/components/link/SoMeLink.tsx index 266d70f4e..57dbc6be5 100644 --- a/src/components/link/SoMeLink.tsx +++ b/src/components/link/SoMeLink.tsx @@ -1,7 +1,7 @@ import React from "react"; import styles from "./link.module.css"; import Link from "next/link"; -import { SocialMediaLink } from "studio/lib/payloads/socialMedia"; +import { SocialMediaLink } from "studio/lib/interfaces/socialMedia"; interface ISoMeLink { link: SocialMediaLink; diff --git a/src/components/linkButton/LinkButton.stories.tsx b/src/components/linkButton/LinkButton.stories.tsx index a86f887ee..396855742 100644 --- a/src/components/linkButton/LinkButton.stories.tsx +++ b/src/components/linkButton/LinkButton.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react"; import LinkButton from "./LinkButton"; -import { LinkType } from "studio/lib/payloads/navigation"; +import { LinkType } from "studio/lib/interfaces/navigation"; const meta: Meta = { title: "Components/Links/LinkButton", diff --git a/src/components/linkButton/LinkButton.tsx b/src/components/linkButton/LinkButton.tsx index 2641991be..bec0c3742 100644 --- a/src/components/linkButton/LinkButton.tsx +++ b/src/components/linkButton/LinkButton.tsx @@ -1,6 +1,6 @@ import React from "react"; import styles from "./linkButton.module.css"; -import { ILink } from "studio/lib/payloads/navigation"; +import { ILink } from "studio/lib/interfaces/navigation"; import { getHref } from "src/utils/get"; type LinkButtonType = "primary" | "secondary"; diff --git a/src/components/navigation/footer/Footer.tsx b/src/components/navigation/footer/Footer.tsx index 49f46d997..9bdebf0f9 100644 --- a/src/components/navigation/footer/Footer.tsx +++ b/src/components/navigation/footer/Footer.tsx @@ -1,19 +1,19 @@ "use client"; -import { ILink, LinkType, Navigation } from "studio/lib/payloads/navigation"; -import { CompanyInfo } from "studio/lib/payloads/companyDetails"; +import { ILink, LinkType, Navigation } from "studio/lib/interfaces/navigation"; +import { CompanyInfo } from "studio/lib/interfaces/companyDetails"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; import styles from "./footer.module.css"; import CustomLink from "../../link/CustomLink"; import { SocialMediaLink, SocialMediaProfiles, -} from "studio/lib/payloads/socialMedia"; +} from "studio/lib/interfaces/socialMedia"; import SoMeLink from "src/components/link/SoMeLink"; import { ReactNode } from "react"; import Text from "src/components/text/Text"; -import { LegalDocument } from "studio/lib/payloads/legalDocuments"; -import { BrandAssets } from "studio/lib/payloads/brandAssets"; +import { LegalDocument } from "studio/lib/interfaces/legalDocuments"; +import { BrandAssets } from "studio/lib/interfaces/brandAssets"; export interface IFooter { navigationData: Navigation; diff --git a/src/components/navigation/footer/FooterPreview.tsx b/src/components/navigation/footer/FooterPreview.tsx index d66d56210..dbb2cf0e1 100644 --- a/src/components/navigation/footer/FooterPreview.tsx +++ b/src/components/navigation/footer/FooterPreview.tsx @@ -1,13 +1,13 @@ "use client"; import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; import { NAV_QUERY } from "studio/lib/queries/navigation"; -import { Navigation } from "studio/lib/payloads/navigation"; -import { CompanyInfo } from "studio/lib/payloads/companyDetails"; +import { Navigation } from "studio/lib/interfaces/navigation"; +import { CompanyInfo } from "studio/lib/interfaces/companyDetails"; import { COMPANY_INFO_QUERY } from "studio/lib/queries/companyDetails"; import Footer from "./Footer"; -import { SocialMediaProfiles } from "studio/lib/payloads/socialMedia"; +import { SocialMediaProfiles } from "studio/lib/interfaces/socialMedia"; import { SOMEPROFILES_QUERY } from "studio/lib/queries/socialMediaProfiles"; -import { BrandAssets } from "studio/lib/payloads/brandAssets"; +import { BrandAssets } from "studio/lib/interfaces/brandAssets"; import { BRAND_ASSETS_QUERY } from "studio/lib/queries/brandAssets"; function useInitialData( diff --git a/src/components/navigation/header/Header.tsx b/src/components/navigation/header/Header.tsx index 1ca917720..8de72979d 100644 --- a/src/components/navigation/header/Header.tsx +++ b/src/components/navigation/header/Header.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { FocusOn } from "react-focus-on"; -import { ILink, Navigation } from "studio/lib/payloads/navigation"; +import { ILink, Navigation } from "studio/lib/interfaces/navigation"; import styles from "./header.module.css"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; import { linkID } from "studio/schemas/objects/link"; @@ -12,7 +12,7 @@ import LinkButton from "src/components/linkButton/LinkButton"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { getHref } from "src/utils/get"; -import { BrandAssets } from "../../../../studio/lib/payloads/brandAssets"; +import { BrandAssets } from "../../../../studio/lib/interfaces/brandAssets"; export interface IHeader { data: Navigation; diff --git a/src/components/navigation/header/HeaderPreview.tsx b/src/components/navigation/header/HeaderPreview.tsx index b32ab3d23..7248c7fac 100644 --- a/src/components/navigation/header/HeaderPreview.tsx +++ b/src/components/navigation/header/HeaderPreview.tsx @@ -1,9 +1,9 @@ "use client"; import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; import { NAV_QUERY } from "studio/lib/queries/navigation"; -import { Navigation } from "studio/lib/payloads/navigation"; +import { Navigation } from "studio/lib/interfaces/navigation"; import { Header } from "./Header"; -import { BrandAssets } from "../../../../studio/lib/payloads/brandAssets"; +import { BrandAssets } from "../../../../studio/lib/interfaces/brandAssets"; import { BRAND_ASSETS_QUERY } from "../../../../studio/lib/queries/brandAssets"; export default function HeaderPreview({ diff --git a/src/components/navigation/mockData.ts b/src/components/navigation/mockData.ts index a97e767e5..4b1fbb2fd 100644 --- a/src/components/navigation/mockData.ts +++ b/src/components/navigation/mockData.ts @@ -2,12 +2,12 @@ import { Navigation, LinkType, SectionType, -} from "studio/lib/payloads/navigation"; +} from "studio/lib/interfaces/navigation"; import { callToActionFieldID } from "studio/schemas/fields/callToActionFields"; import { linkID } from "studio/schemas/objects/link"; import primaryLogoFile from "../../stories/assets/energiai-primary-logo.svg"; import secondaryLogoFile from "../../stories/assets/energiai-secondary-logo.svg"; -import { SocialMediaProfiles } from "studio/lib/payloads/socialMedia"; +import { SocialMediaProfiles } from "studio/lib/interfaces/socialMedia"; // Mock Navigation Data export const mockNavigation: Navigation = { diff --git a/src/components/sections/article/Article.tsx b/src/components/sections/article/Article.tsx index 737019034..e8956f887 100644 --- a/src/components/sections/article/Article.tsx +++ b/src/components/sections/article/Article.tsx @@ -1,7 +1,7 @@ "use client"; import { RichText } from "src/components/richText/RichText"; import Text from "src/components/text/Text"; -import { ArticleSection } from "studio/lib/payloads/pages"; +import { ArticleSection } from "studio/lib/interfaces/pages"; import styles from "./article.module.css"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; import CustomLink from "src/components/link/CustomLink"; diff --git a/src/components/sections/article/ArticlePreview.tsx b/src/components/sections/article/ArticlePreview.tsx index 4daf7f247..255a9bdc5 100644 --- a/src/components/sections/article/ArticlePreview.tsx +++ b/src/components/sections/article/ArticlePreview.tsx @@ -2,7 +2,7 @@ import { useQuery } from "@sanity/react-loader"; import Article from "./Article"; -import { PageBuilder, ArticleSection } from "studio/lib/payloads/pages"; +import { PageBuilder, ArticleSection } from "studio/lib/interfaces/pages"; import { PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { PreviewProps } from "src/types/preview"; diff --git a/src/components/sections/article/mockData.ts b/src/components/sections/article/mockData.ts index 126fbd5dc..0b6e2cede 100644 --- a/src/components/sections/article/mockData.ts +++ b/src/components/sections/article/mockData.ts @@ -1,5 +1,5 @@ -import { LinkType } from "studio/lib/payloads/navigation"; -import { ArticleSection } from "studio/lib/payloads/pages"; +import { LinkType } from "studio/lib/interfaces/navigation"; +import { ArticleSection } from "studio/lib/interfaces/pages"; import { ImageAlignment } from "studio/schemas/fields/media"; import placeholder from "../../../stories/assets/image-placeholder.png"; import { PortableTextBlock } from "src/components/richText/RichText"; diff --git a/src/components/sections/callToAction/CallToAction.tsx b/src/components/sections/callToAction/CallToAction.tsx index 4c0ca80bc..e635ebc2a 100644 --- a/src/components/sections/callToAction/CallToAction.tsx +++ b/src/components/sections/callToAction/CallToAction.tsx @@ -1,6 +1,6 @@ import Text from "src/components/text/Text"; import LinkButton from "src/components/linkButton/LinkButton"; -import { CallToActionSection } from "studio/lib/payloads/pages"; +import { CallToActionSection } from "studio/lib/interfaces/pages"; import styles from "./callToAction.module.css"; interface CallToActionProps { diff --git a/src/components/sections/callToAction/CallToActionPreview.tsx b/src/components/sections/callToAction/CallToActionPreview.tsx index c4fa1b1a4..2b9e25b7f 100644 --- a/src/components/sections/callToAction/CallToActionPreview.tsx +++ b/src/components/sections/callToAction/CallToActionPreview.tsx @@ -2,7 +2,7 @@ import { useQuery } from "@sanity/react-loader"; import CallToAction from "./CallToAction"; -import { PageBuilder, CallToActionSection } from "studio/lib/payloads/pages"; +import { PageBuilder, CallToActionSection } from "studio/lib/interfaces/pages"; import { PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { PreviewProps } from "src/types/preview"; diff --git a/src/components/sections/callToAction/mockData.ts b/src/components/sections/callToAction/mockData.ts index fe8da4720..88dd2ed22 100644 --- a/src/components/sections/callToAction/mockData.ts +++ b/src/components/sections/callToAction/mockData.ts @@ -1,4 +1,4 @@ -import { LinkType } from "studio/lib/payloads/navigation"; +import { LinkType } from "studio/lib/interfaces/navigation"; export const ctaMockData = { _key: "9410f9860a00", diff --git a/src/components/sections/callout/Callout.tsx b/src/components/sections/callout/Callout.tsx index 88e61dfe7..a3d34f429 100644 --- a/src/components/sections/callout/Callout.tsx +++ b/src/components/sections/callout/Callout.tsx @@ -1,5 +1,5 @@ import CustomLink from "src/components/link/CustomLink"; -import { CalloutSection } from "studio/lib/payloads/pages"; +import { CalloutSection } from "studio/lib/interfaces/pages"; import styles from "./callout.module.css"; import { PortableText } from "@portabletext/react"; import Text from "src/components/text/Text"; diff --git a/src/components/sections/callout/CalloutPreview.tsx b/src/components/sections/callout/CalloutPreview.tsx index cf6aafdab..bde6a6255 100644 --- a/src/components/sections/callout/CalloutPreview.tsx +++ b/src/components/sections/callout/CalloutPreview.tsx @@ -2,7 +2,7 @@ import { useQuery } from "@sanity/react-loader"; import Callout from "./Callout"; -import { PageBuilder, CalloutSection } from "studio/lib/payloads/pages"; +import { PageBuilder, CalloutSection } from "studio/lib/interfaces/pages"; import { PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { PreviewProps } from "src/types/preview"; diff --git a/src/components/sections/callout/mockData.ts b/src/components/sections/callout/mockData.ts index 704ae3f1e..dae8799f5 100644 --- a/src/components/sections/callout/mockData.ts +++ b/src/components/sections/callout/mockData.ts @@ -1,5 +1,5 @@ import { PortableTextBlock } from "src/components/richText/RichText"; -import { LinkType } from "studio/lib/payloads/navigation"; +import { LinkType } from "studio/lib/interfaces/navigation"; const RichTextMock: PortableTextBlock[] = [ { diff --git a/src/components/sections/contactForm/ContactForm.tsx b/src/components/sections/contactForm/ContactForm.tsx index e962aae57..d4d1a8f2d 100644 --- a/src/components/sections/contactForm/ContactForm.tsx +++ b/src/components/sections/contactForm/ContactForm.tsx @@ -2,7 +2,7 @@ import React, { useState, ChangeEvent, FormEvent } from "react"; import Text from "src/components/text/Text"; -import { ContactFormSection } from "studio/lib/payloads/pages"; +import { ContactFormSection } from "studio/lib/interfaces/pages"; import styles from "./contactForm.module.css"; import InputField from "src/components/forms/inputField/InputField"; import Button from "src/components/buttons/Button"; diff --git a/src/components/sections/grid/Grid.tsx b/src/components/sections/grid/Grid.tsx index 7b1be0c2d..20e9eddd9 100644 --- a/src/components/sections/grid/Grid.tsx +++ b/src/components/sections/grid/Grid.tsx @@ -1,11 +1,11 @@ "use client"; import Text from "src/components/text/Text"; -import { GridSection } from "studio/lib/payloads/pages"; +import { GridSection } from "studio/lib/interfaces/pages"; import styles from "./grid.module.css"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; import { PortableText } from "@portabletext/react"; import { PortableTextBlock } from "src/components/richText/RichText"; -import { IImage } from "studio/lib/payloads/media"; +import { IImage } from "studio/lib/interfaces/media"; const Grid = ({ grid }: { grid: GridSection }) => { return ( diff --git a/src/components/sections/grid/GridPreview.tsx b/src/components/sections/grid/GridPreview.tsx index 830593398..31beb31ba 100644 --- a/src/components/sections/grid/GridPreview.tsx +++ b/src/components/sections/grid/GridPreview.tsx @@ -1,7 +1,7 @@ "use client"; import { useQuery } from "@sanity/react-loader"; -import { PageBuilder, GridSection } from "studio/lib/payloads/pages"; +import { PageBuilder, GridSection } from "studio/lib/interfaces/pages"; import { PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { PreviewProps } from "src/types/preview"; diff --git a/src/components/sections/hero/Hero.tsx b/src/components/sections/hero/Hero.tsx index 1ad592dcb..6dbf04ef9 100644 --- a/src/components/sections/hero/Hero.tsx +++ b/src/components/sections/hero/Hero.tsx @@ -1,8 +1,8 @@ import Text from "src/components/text/Text"; import LinkButton from "src/components/linkButton/LinkButton"; -import { HeroSection } from "studio/lib/payloads/pages"; +import { HeroSection } from "studio/lib/interfaces/pages"; import styles from "./hero.module.css"; -import { ILink } from "studio/lib/payloads/navigation"; +import { ILink } from "studio/lib/interfaces/navigation"; interface HeroProps { hero: HeroSection; diff --git a/src/components/sections/hero/HeroPreview.tsx b/src/components/sections/hero/HeroPreview.tsx index 3b4dd472a..7565fef26 100644 --- a/src/components/sections/hero/HeroPreview.tsx +++ b/src/components/sections/hero/HeroPreview.tsx @@ -2,7 +2,7 @@ import { useQuery } from "@sanity/react-loader"; import { Hero } from "./Hero"; -import { PageBuilder, HeroSection } from "studio/lib/payloads/pages"; +import { PageBuilder, HeroSection } from "studio/lib/interfaces/pages"; import { PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { PreviewProps } from "src/types/preview"; diff --git a/src/components/sections/hero/mockData.ts b/src/components/sections/hero/mockData.ts index fee10ef9e..21980ffab 100644 --- a/src/components/sections/hero/mockData.ts +++ b/src/components/sections/hero/mockData.ts @@ -1,5 +1,5 @@ -import { HeroSection } from "studio/lib/payloads/pages"; -import { LinkType } from "studio/lib/payloads/navigation"; +import { HeroSection } from "studio/lib/interfaces/pages"; +import { LinkType } from "studio/lib/interfaces/navigation"; export const mockHeroSection: HeroSection = { _key: "", diff --git a/src/components/sections/imageSection/ImageSectionComponent.tsx b/src/components/sections/imageSection/ImageSectionComponent.tsx index 7d5cd813a..027500c12 100644 --- a/src/components/sections/imageSection/ImageSectionComponent.tsx +++ b/src/components/sections/imageSection/ImageSectionComponent.tsx @@ -1,7 +1,7 @@ "use client"; import Text from "src/components/text/Text"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; -import { ImageSection } from "studio/lib/payloads/pages"; +import { ImageSection } from "studio/lib/interfaces/pages"; import styles from "./imageSectionComponent.module.css"; const ImageSectionComponent = ({ section }: { section: ImageSection }) => { diff --git a/src/components/sections/imageSection/ImageSectionComponentPreview.tsx b/src/components/sections/imageSection/ImageSectionComponentPreview.tsx index 9eda15c2d..c31049459 100644 --- a/src/components/sections/imageSection/ImageSectionComponentPreview.tsx +++ b/src/components/sections/imageSection/ImageSectionComponentPreview.tsx @@ -4,7 +4,7 @@ import { ImageSection, PageBuilder, TestimonialsSection, -} from "studio/lib/payloads/pages"; +} from "studio/lib/interfaces/pages"; import { PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { PreviewProps } from "src/types/preview"; diff --git a/src/components/sections/logoSalad/LogoRender.tsx b/src/components/sections/logoSalad/LogoRender.tsx index 6e9b8f25b..86f7e6db5 100644 --- a/src/components/sections/logoSalad/LogoRender.tsx +++ b/src/components/sections/logoSalad/LogoRender.tsx @@ -1,6 +1,6 @@ "use client"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; -import { IImage } from "studio/lib/payloads/media"; +import { IImage } from "studio/lib/interfaces/media"; export const RenderLogo = ({ asset }: { asset: IImage }) => { const renderedLogo = useConvertSanityImageToNextImage(asset); diff --git a/src/components/sections/logoSalad/LogoSalad.tsx b/src/components/sections/logoSalad/LogoSalad.tsx index ae9a0bae2..0d0b5b81b 100644 --- a/src/components/sections/logoSalad/LogoSalad.tsx +++ b/src/components/sections/logoSalad/LogoSalad.tsx @@ -1,5 +1,5 @@ import Text from "src/components/text/Text"; -import { LogoSaladSection } from "studio/lib/payloads/pages"; +import { LogoSaladSection } from "studio/lib/interfaces/pages"; import styles from "./logoSalad.module.css"; import { RenderLogo } from "./LogoRender"; import { PortableText } from "@portabletext/react"; diff --git a/src/components/sections/logoSalad/LogoSaladPreview.tsx b/src/components/sections/logoSalad/LogoSaladPreview.tsx index d09d4fb27..a67c22201 100644 --- a/src/components/sections/logoSalad/LogoSaladPreview.tsx +++ b/src/components/sections/logoSalad/LogoSaladPreview.tsx @@ -2,7 +2,7 @@ import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; import { LogoSalad } from "./LogoSalad"; -import { PageBuilder, LogoSaladSection } from "studio/lib/payloads/pages"; +import { PageBuilder, LogoSaladSection } from "studio/lib/interfaces/pages"; import { PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { PreviewProps } from "src/types/preview"; diff --git a/src/components/sections/logoSalad/mockData.ts b/src/components/sections/logoSalad/mockData.ts index ee9eada19..7296724f2 100644 --- a/src/components/sections/logoSalad/mockData.ts +++ b/src/components/sections/logoSalad/mockData.ts @@ -1,4 +1,4 @@ -import { LogoSaladSection } from "studio/lib/payloads/pages"; +import { LogoSaladSection } from "studio/lib/interfaces/pages"; import sparebanknord from "../../../stories/assets/logoSalad/sparebank1-nord-norge.png"; import sevenoffice from "../../../stories/assets/logoSalad/24sevenoffice.png"; import credoPartners from "../../../stories/assets/logoSalad/credo-partners.png"; diff --git a/src/components/sections/testimonials/RenderAvatar.tsx b/src/components/sections/testimonials/RenderAvatar.tsx index 37757ec9f..39e393294 100644 --- a/src/components/sections/testimonials/RenderAvatar.tsx +++ b/src/components/sections/testimonials/RenderAvatar.tsx @@ -1,7 +1,7 @@ "use client"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; -import { IImage } from "studio/lib/payloads/media"; +import { IImage } from "studio/lib/interfaces/media"; export const RenderImage = ({ image }: { image: IImage }) => { const renderedImage = useConvertSanityImageToNextImage(image); diff --git a/src/components/sections/testimonials/Testimonials.tsx b/src/components/sections/testimonials/Testimonials.tsx index ed1d02d0b..29297b40a 100644 --- a/src/components/sections/testimonials/Testimonials.tsx +++ b/src/components/sections/testimonials/Testimonials.tsx @@ -1,6 +1,6 @@ "use client"; import Text from "src/components/text/Text"; -import { TestimonialsSection } from "studio/lib/payloads/pages"; +import { TestimonialsSection } from "studio/lib/interfaces/pages"; import styles from "./testimonials.module.css"; import { RenderImage } from "./RenderAvatar"; import { RichText } from "src/components/richText/RichText"; diff --git a/src/components/sections/testimonials/TestimonialsPreview.tsx b/src/components/sections/testimonials/TestimonialsPreview.tsx index cb14ab394..2d8ee8aaf 100644 --- a/src/components/sections/testimonials/TestimonialsPreview.tsx +++ b/src/components/sections/testimonials/TestimonialsPreview.tsx @@ -2,7 +2,7 @@ import { useQuery } from "@sanity/react-loader"; import { Testimonials } from "./Testimonials"; -import { PageBuilder, TestimonialsSection } from "studio/lib/payloads/pages"; +import { PageBuilder, TestimonialsSection } from "studio/lib/interfaces/pages"; import { PAGE_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import { PreviewProps } from "src/types/preview"; diff --git a/src/components/sections/testimonials/mockData.ts b/src/components/sections/testimonials/mockData.ts index 4205f2fb7..8d2355e11 100644 --- a/src/components/sections/testimonials/mockData.ts +++ b/src/components/sections/testimonials/mockData.ts @@ -1,4 +1,4 @@ -import { TestimonialsSection } from "studio/lib/payloads/pages"; +import { TestimonialsSection } from "studio/lib/interfaces/pages"; import alex from "../../../stories/assets/alex.jpg"; import mika from "../../../stories/assets/mika.jpg"; import vince from "../../../stories/assets/vince.jpg"; diff --git a/src/middleware.ts b/src/middleware.ts index f3f973917..5c59a585b 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,6 +1,6 @@ import { NextRequest, NextResponse } from "next/server"; import { HTTP_STATUSES } from "./utils/http"; -import { RedirectDestinationSlugPage } from "studio/lib/payloads/redirect"; +import { RedirectDestinationSlugPage } from "studio/lib/interfaces/redirect"; import { REDIRECT_BY_SOURCE_SLUG_QUERY } from "../studio/lib/queries/redirects"; export async function middleware(request: NextRequest) { diff --git a/src/post/PostPage.tsx b/src/post/PostPage.tsx index ae137054b..abc33b362 100644 --- a/src/post/PostPage.tsx +++ b/src/post/PostPage.tsx @@ -1,4 +1,4 @@ -import { BlogPage, Post } from "studio/lib/payloads/pages"; +import { BlogPage, Post } from "studio/lib/interfaces/pages"; import PostHero from "./hero/PostHero"; import Lead from "./lead/Lead"; import styles from "./post.module.css"; diff --git a/src/post/PostPagePreview.tsx b/src/post/PostPagePreview.tsx index d5e9b8464..3df118c4e 100644 --- a/src/post/PostPagePreview.tsx +++ b/src/post/PostPagePreview.tsx @@ -1,6 +1,6 @@ "use client"; import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; -import { BlogPage, Post } from "studio/lib/payloads/pages"; +import { BlogPage, Post } from "studio/lib/interfaces/pages"; import { POST_SLUG_QUERY } from "studio/lib/queries/pages"; import { Suspense } from "react"; import PostPage from "./PostPage"; diff --git a/src/post/lead/Lead.tsx b/src/post/lead/Lead.tsx index 4a6e84e09..0072fcf3c 100644 --- a/src/post/lead/Lead.tsx +++ b/src/post/lead/Lead.tsx @@ -1,7 +1,7 @@ "use client"; import { PortableTextBlock } from "src/components/richText/RichText"; import { useConvertSanityImageToNextImage } from "src/utils/hooks/useConvertImage"; -import { IImage } from "studio/lib/payloads/media"; +import { IImage } from "studio/lib/interfaces/media"; import styles from "./lead.module.css"; import { PortableText } from "@portabletext/react"; import Text from "src/components/text/Text"; diff --git a/src/post/morePostsGrid/MorePostsGrid.tsx b/src/post/morePostsGrid/MorePostsGrid.tsx index c47f099ff..1791c172f 100644 --- a/src/post/morePostsGrid/MorePostsGrid.tsx +++ b/src/post/morePostsGrid/MorePostsGrid.tsx @@ -1,5 +1,5 @@ import Text from "src/components/text/Text"; -import { Post } from "studio/lib/payloads/pages"; +import { Post } from "studio/lib/interfaces/pages"; import styles from "./morePostsGrid.module.css"; import BackButton from "src/components/buttons/BackButton"; import { PostCard } from "src/blog/components/postCard/PostCard"; diff --git a/src/post/morePostsGrid/mockdata.ts b/src/post/morePostsGrid/mockdata.ts index 3d492f413..096aa20d5 100644 --- a/src/post/morePostsGrid/mockdata.ts +++ b/src/post/morePostsGrid/mockdata.ts @@ -1,4 +1,4 @@ -import { Post } from "studio/lib/payloads/pages"; +import { Post } from "studio/lib/interfaces/pages"; import placeholder from "../../stories/assets/image-placeholder.png"; export const mockPosts: Post[] = [ diff --git a/src/types/preview.ts b/src/types/preview.ts index 683aafc77..ae0b6e408 100644 --- a/src/types/preview.ts +++ b/src/types/preview.ts @@ -1,5 +1,5 @@ import { QueryResponseInitial } from "@sanity/react-loader"; -import { PageBuilder } from "studio/lib/payloads/pages"; +import { PageBuilder } from "studio/lib/interfaces/pages"; export interface PreviewProps { initialData: QueryResponseInitial; diff --git a/src/utils/api.ts b/src/utils/api.ts index 9f44e87fe..5b27f4dd8 100644 --- a/src/utils/api.ts +++ b/src/utils/api.ts @@ -3,7 +3,7 @@ import { CATEGORIZED_POSTS_QUERY, COUNT_POSTS_QUERY, } from "studio/lib/queries/pages"; -import { Post } from "studio/lib/payloads/pages"; +import { Post } from "studio/lib/interfaces/pages"; interface FetchResult { data: Post[]; diff --git a/src/utils/get.tsx b/src/utils/get.tsx index 34388b510..443661d77 100644 --- a/src/utils/get.tsx +++ b/src/utils/get.tsx @@ -1,4 +1,4 @@ -import { ILink, LinkType } from "studio/lib/payloads/navigation"; +import { ILink, LinkType } from "studio/lib/interfaces/navigation"; const hash = "#"; diff --git a/src/utils/hooks/useConvertImage.tsx b/src/utils/hooks/useConvertImage.tsx index 817d7eb12..bc5e9624f 100644 --- a/src/utils/hooks/useConvertImage.tsx +++ b/src/utils/hooks/useConvertImage.tsx @@ -1,7 +1,7 @@ import { useNextSanityImage } from "next-sanity-image"; // TODO: add support for sharedClient import { client } from "studio/lib/client"; -import { IImage } from "studio/lib/payloads/media"; +import { IImage } from "studio/lib/interfaces/media"; import Image from "next/image"; import { JSX } from "react"; diff --git a/src/utils/hooks/useFetchPosts.ts b/src/utils/hooks/useFetchPosts.ts index 93019d6d4..7b7f497d0 100644 --- a/src/utils/hooks/useFetchPosts.ts +++ b/src/utils/hooks/useFetchPosts.ts @@ -1,5 +1,5 @@ import { useCallback, useState } from "react"; -import { Category, Post } from "studio/lib/payloads/pages"; +import { Category, Post } from "studio/lib/interfaces/pages"; import { fetchCategorizedPosts, fetchPostCount } from "../api"; interface FetchState { diff --git a/src/utils/renderSection.tsx b/src/utils/renderSection.tsx index 09371a6b6..8123c5ffd 100644 --- a/src/utils/renderSection.tsx +++ b/src/utils/renderSection.tsx @@ -19,7 +19,7 @@ import { ImageSection, GridSection, ContactFormSection, -} from "studio/lib/payloads/pages"; +} from "studio/lib/interfaces/pages"; import CalloutPreview from "src/components/sections/callout/CalloutPreview"; import CallToAction from "src/components/sections/callToAction/CallToAction"; import CallToActionPreview from "src/components/sections/callToAction/CallToActionPreview"; diff --git a/src/utils/seo.ts b/src/utils/seo.ts index f092329b0..f26cc73bc 100644 --- a/src/utils/seo.ts +++ b/src/utils/seo.ts @@ -5,10 +5,10 @@ import { COMPANY_INFO_QUERY } from "studio/lib/queries/companyDetails"; import { loadQuery } from "studio/lib/store"; import { PortableTextBlock } from "src/components/richText/RichText"; import { DEFAULT_SEO_QUERY } from "../../studio/lib/queries/seo"; -import { DefaultSeo } from "../../studio/lib/payloads/defaultSeo"; -import { BrandAssets } from "../../studio/lib/payloads/brandAssets"; +import { DefaultSeo } from "../../studio/lib/interfaces/defaultSeo"; +import { BrandAssets } from "../../studio/lib/interfaces/brandAssets"; import { BRAND_ASSETS_QUERY } from "../../studio/lib/queries/brandAssets"; -import { CompanyInfo } from "../../studio/lib/payloads/companyDetails"; +import { CompanyInfo } from "../../studio/lib/interfaces/companyDetails"; type SeoData = { title: string; diff --git a/studio/lib/payloads/brandAssets.ts b/studio/lib/interfaces/brandAssets.ts similarity index 100% rename from studio/lib/payloads/brandAssets.ts rename to studio/lib/interfaces/brandAssets.ts diff --git a/studio/lib/payloads/companyDetails.ts b/studio/lib/interfaces/companyDetails.ts similarity index 100% rename from studio/lib/payloads/companyDetails.ts rename to studio/lib/interfaces/companyDetails.ts diff --git a/studio/lib/payloads/compensations.ts b/studio/lib/interfaces/compensations.ts similarity index 100% rename from studio/lib/payloads/compensations.ts rename to studio/lib/interfaces/compensations.ts diff --git a/studio/lib/payloads/defaultSeo.ts b/studio/lib/interfaces/defaultSeo.ts similarity index 100% rename from studio/lib/payloads/defaultSeo.ts rename to studio/lib/interfaces/defaultSeo.ts diff --git a/studio/lib/payloads/global.ts b/studio/lib/interfaces/global.ts similarity index 100% rename from studio/lib/payloads/global.ts rename to studio/lib/interfaces/global.ts diff --git a/studio/lib/payloads/languages.ts b/studio/lib/interfaces/languages.ts similarity index 100% rename from studio/lib/payloads/languages.ts rename to studio/lib/interfaces/languages.ts diff --git a/studio/lib/payloads/legalDocuments.ts b/studio/lib/interfaces/legalDocuments.ts similarity index 100% rename from studio/lib/payloads/legalDocuments.ts rename to studio/lib/interfaces/legalDocuments.ts diff --git a/studio/lib/payloads/media.ts b/studio/lib/interfaces/media.ts similarity index 100% rename from studio/lib/payloads/media.ts rename to studio/lib/interfaces/media.ts diff --git a/studio/lib/payloads/navigation.ts b/studio/lib/interfaces/navigation.ts similarity index 100% rename from studio/lib/payloads/navigation.ts rename to studio/lib/interfaces/navigation.ts diff --git a/studio/lib/payloads/pages.ts b/studio/lib/interfaces/pages.ts similarity index 100% rename from studio/lib/payloads/pages.ts rename to studio/lib/interfaces/pages.ts diff --git a/studio/lib/payloads/redirect.ts b/studio/lib/interfaces/redirect.ts similarity index 100% rename from studio/lib/payloads/redirect.ts rename to studio/lib/interfaces/redirect.ts diff --git a/studio/lib/payloads/socialMedia.ts b/studio/lib/interfaces/socialMedia.ts similarity index 100% rename from studio/lib/payloads/socialMedia.ts rename to studio/lib/interfaces/socialMedia.ts diff --git a/studio/schemas/objects/compensations/bonusesByLocation.ts b/studio/schemas/objects/compensations/bonusesByLocation.ts index 4228f917d..7e0d93b03 100644 --- a/studio/schemas/objects/compensations/bonusesByLocation.ts +++ b/studio/schemas/objects/compensations/bonusesByLocation.ts @@ -5,7 +5,7 @@ import { DocumentWithLocation, checkForDuplicateLocations, } from "./utils/validation"; -import { BonusPage } from "../../../lib/payloads/compensations"; +import { BonusPage } from "../../../lib/interfaces/compensations"; export const bonusesByLocation = defineField({ name: "bonusesByLocation", diff --git a/studio/schemas/objects/compensations/salariesByLocation.ts b/studio/schemas/objects/compensations/salariesByLocation.ts index 6afc974c1..5ef04bbbd 100644 --- a/studio/schemas/objects/compensations/salariesByLocation.ts +++ b/studio/schemas/objects/compensations/salariesByLocation.ts @@ -6,7 +6,7 @@ import { } from "./utils/validation"; import { companyLocationNameID } from "../../documents/companyLocation"; import { SalariesInput } from "../../../components/salariesInput/SalariesInput"; -import { SalariesPage } from "../../../lib/payloads/compensations"; +import { SalariesPage } from "../../../lib/interfaces/compensations"; export const salariesByLocation = defineField({ name: "salariesByLocation",