-
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.
feat(studio): combine studio configs into a single multi-workspace co…
…nfig (#596) provides a dropdown to navigate between studios, removing the need for the custom shared studio link
- Loading branch information
Showing
11 changed files
with
63 additions
and
48 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,11 @@ | ||
/** | ||
* This configuration is used to for the Sanity Studio that’s mounted on the routes: | ||
* - `/app/studio/[[...index]]/page.tsx` | ||
* - `/app/studioShared/[[...index]]/page.tsx` | ||
*/ | ||
|
||
import { defineConfig } from "sanity"; | ||
import sharedStudioConfig from "./studioShared/studioConfig"; | ||
import studioConfig from "./studio/studioConfig"; | ||
|
||
export default defineConfig([studioConfig, sharedStudioConfig]); |
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 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,16 @@ | ||
import styles from "./studioIcon.module.css"; | ||
import Image from "next/image"; | ||
|
||
const StudioIcon = ({ variant }: { variant: "studio" | "shared" }) => { | ||
return ( | ||
<Image | ||
alt={"Studio Icon"} | ||
width={540} | ||
height={540} | ||
className={styles.icon} | ||
src={variant === "studio" ? "/studioIcon.png" : "/sharedStudioIcon.png"} | ||
/> | ||
); | ||
}; | ||
|
||
export default StudioIcon; |
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,5 @@ | ||
.icon { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: contain; | ||
} |
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 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,19 @@ | ||
import { dataset, projectId } from "./env"; | ||
import { schema } from "./schema"; | ||
import { structureTool } from "sanity/structure"; | ||
import { WorkspaceOptions } from "sanity"; | ||
import StudioIcon from "../studio/components/studioIcon/StudioIcon"; | ||
|
||
const config: WorkspaceOptions = { | ||
name: "sharedStudio", | ||
title: "Shared Studio", | ||
subtitle: "Sharing is Caring!", | ||
icon: () => <StudioIcon variant={"shared"} />, | ||
basePath: "/shared", | ||
projectId, | ||
dataset, | ||
schema, | ||
plugins: [structureTool()], | ||
}; | ||
|
||
export default config; |