Skip to content

Commit

Permalink
removed link from blog
Browse files Browse the repository at this point in the history
  • Loading branch information
anemne committed Aug 30, 2024
1 parent 6100d30 commit 4d15e63
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/components/link/CustomLink.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LinkType } from "studio/lib/payloads/navigation";

const meta: Meta<typeof CustomLink> = {
title: "Components/Links/CustomLink",
component: CustomLink,
CustomLink,
parameters: {
a11y: {
element: "a",
Expand Down
2 changes: 1 addition & 1 deletion studio/components/CustomToolMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function CustomToolMenu(props: ToolMenuProps) {
return (
<Inline>
{props.renderDefault(props)}
<LinkButton />
<LinkButton value="/shared" />
</Inline>
);
}
8 changes: 6 additions & 2 deletions studio/components/linkButton/LinkButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { ArrowRightIcon } from "@sanity/icons";
import styles from "./linkButton.module.css";

export const LinkButton = () => {
interface LinkButtonProps {
value?: string;
}

export const LinkButton = ({ value }: LinkButtonProps) => {
return (
<a className={styles.wrapper} href={"/shared"}>
<a className={styles.wrapper} href={value}>
<span className={styles.text}>
Shared Studio <ArrowRightIcon />
</span>
Expand Down
11 changes: 0 additions & 11 deletions studio/schemas/documents/blog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { defineField, defineType } from "sanity";
import seo from "../objects/seo";
import { pageSlug } from "../schemaTypes/slug";
import { title } from "../fields/text";
import { LinkButton } from "studio/components/linkButton/LinkButton";

export const blogId = "blog";

Expand Down Expand Up @@ -55,16 +54,6 @@ const blog = defineType({
}),
],
}),
defineField({
name: "goToSharedContentLink",
title: "Go To Shared Content",
description:
"To create and edit blog posts, go to the shared Sanity project",
type: "link",
components: {
input: LinkButton,
},
}),
],
preview: {
select: {
Expand Down

0 comments on commit 4d15e63

Please sign in to comment.