-
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.
move all siteSettings related queries to siteSetting.ts
- Loading branch information
Showing
18 changed files
with
108 additions
and
102 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
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import { groq } from "next-sanity"; | ||
|
||
import { brandAssetsID } from "studio/schemas/documents/siteSettings/brandAssets"; | ||
|
||
//Brand Assets | ||
export const BRAND_ASSETS_QUERY = groq` | ||
*[_type == "${brandAssetsID}" && _id == "${brandAssetsID}"][0] | ||
`; | ||
|
||
//Navigation Manager | ||
export const NAV_QUERY = groq` | ||
*[_type == "navigationManager"][0]{ | ||
"main": main[] { | ||
..., | ||
linkType == "internal" => { | ||
..., | ||
"internalLink": internalLink->{ | ||
"_ref": slug.current | ||
} | ||
} | ||
}, | ||
"footer": footer[] { | ||
..., | ||
linksAndContent[] { | ||
..., | ||
linkType == "internal" => { | ||
..., | ||
"internalLink": internalLink->{ | ||
"_ref": slug.current | ||
} | ||
} | ||
}, | ||
socialMediaLinks->{ | ||
"_ref": slug.current | ||
} | ||
}, | ||
"sidebar": sidebar[] { | ||
..., | ||
linkType == "internal" => { | ||
..., | ||
"internalLink": internalLink->{ | ||
"_ref": slug.current | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
|
||
export const LANDING_PAGE_REF_QUERY = groq` | ||
*[_type == "navigationManager"][0].setLanding._ref | ||
`; | ||
|
||
export const LANDING_PAGE_QUERY = groq` | ||
*[_type == "navigationManager"][0].setLanding -> | ||
`; | ||
|
||
//Social Media Profiles | ||
export const SOME_PROFILES_QUERY = groq` | ||
*[_type == "soMeLinksID" && _id == "soMeLinksID"][0] | ||
`; | ||
|
||
//Languages | ||
export const DEFAULT_LANGUAGE_QUERY = groq`*[_type == "languageSettings" && _id == "languageSettings"][0].languages[default][0]`; | ||
|
||
//Default SEO | ||
export const DEFAULT_SEO_QUERY = groq`*[_type == "seoFallback"]{ | ||
seo { | ||
seoTitle, | ||
seoDescription, | ||
seoKeywords, | ||
"seoImageUrl": seoImage.asset->url | ||
} | ||
}[0]`; | ||
|
||
//Broken Links | ||
export const REDIRECT_BY_SOURCE_SLUG_QUERY = groq` | ||
*[_type == "redirect" && source.current == $slug][0]{ | ||
"destination": select( | ||
destination.type == "reference" => destination.reference->slug.current, | ||
destination.type == "external" => destination.external | ||
) | ||
} | ||
`; |
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