-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3 - replace SalaryAndBenefits with Compensations list (#551)
* feat: Office document * refactor(compensations): rename salaryAndBenefits to compensations * feat(studio): move Compensations under Static Pages * feat(Compensations): document list for compensations * chore(salaryAndBenefits): add deprecation TODO
- Loading branch information
Showing
16 changed files
with
107 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"use client"; | ||
import { Suspense } from "react"; | ||
import Compensations from "./Compensations"; | ||
import { QueryResponseInitial, useQuery } from "@sanity/react-loader"; | ||
import { CompensationsPage } from "studio/lib/payloads/compensations"; | ||
import { COMPENSATIONS_PAGE_QUERY } from "studio/lib/queries/pages"; | ||
|
||
interface CompensationsPreviewProps { | ||
initialCompensations: QueryResponseInitial<CompensationsPage>; | ||
} | ||
|
||
const CompensationsPreview = ({ | ||
initialCompensations, | ||
}: CompensationsPreviewProps) => { | ||
const { data } = useQuery<CompensationsPage>( | ||
COMPENSATIONS_PAGE_QUERY, | ||
{ slug: initialCompensations.data.slug.current }, | ||
{ initial: initialCompensations }, | ||
); | ||
|
||
return ( | ||
<Suspense> | ||
<Compensations compensations={data} /> | ||
</Suspense> | ||
); | ||
}; | ||
|
||
export default CompensationsPreview; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { defineField, defineType } from "sanity"; | ||
import { titleSlug } from "../schemaTypes/slug"; | ||
import seo from "../objects/seo"; | ||
import { title } from "../fields/text"; | ||
import { benefitId } from "./benefit"; | ||
|
||
export const compensationsId = "compensations"; | ||
|
||
const compensations = defineType({ | ||
name: compensationsId, | ||
type: "document", | ||
title: "Compensations", | ||
fields: [ | ||
title, | ||
titleSlug, | ||
seo, | ||
defineField({ | ||
name: "showSalaryCalculator", | ||
title: "Show Salary Calculator", | ||
description: "Should the salary calculator be visible on the page?", | ||
type: "boolean", | ||
initialValue: true, | ||
}), | ||
defineField({ | ||
name: "benefits", | ||
title: "Benefits", | ||
description: "Manage benefits for the compensations page", | ||
type: "array", | ||
of: [{ type: benefitId }], | ||
}), | ||
], | ||
}); | ||
|
||
export default compensations; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters