Skip to content

Commit

Permalink
fix(🐛): cancel typo (#92)
Browse files Browse the repository at this point in the history
Co-authored-by: Anton Lilleby <[email protected]>
  • Loading branch information
an2n and Anton Lilleby authored Jul 29, 2024
1 parent 27e6a3b commit cd00488
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/models/sanity.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export type Event = {
_createdAt: string;
_updatedAt: string;
_rev: string;
cancleId?: string;
cancelId?: string;
title: string;
image?: {
asset?: {
Expand Down
2 changes: 2 additions & 0 deletions app/static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow: /event/
2 changes: 1 addition & 1 deletion studio/actions/cancel-event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const CancelAction: DocumentActionComponent = (props: DocumentActionProps
return;
}

patch.execute([{ set: { cancleId: props.id } }]);
patch.execute([{ set: { cancelId: props.id } }]);
unpublish.execute();

toast.push({
Expand Down
2 changes: 1 addition & 1 deletion studio/actions/publish-event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function createExtendedEventPublishAction(originalPublishAction: Document
return {
...originalResult,
label: "Publiser",
disabled: originalResult?.disabled || draftEvent?.cancleId === props.id,
disabled: originalResult?.disabled || draftEvent?.cancelId === props.id,

onHandle: () => {
if (!originalResult?.onHandle) return;
Expand Down
2 changes: 1 addition & 1 deletion studio/models/sanity.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export type Event = {
_createdAt: string;
_updatedAt: string;
_rev: string;
cancleId?: string;
cancelId?: string;
title: string;
image?: {
asset?: {
Expand Down
6 changes: 3 additions & 3 deletions studio/schemas/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ export default defineType({
title: "Arrangement",
type: "document",
readOnly: ({ document }) => {
if (!document?.cancleId) {
if (!document?.cancelId) {
return false;
}
if (document?._id.endsWith(document.cancleId as string)) {
if (document?._id.endsWith(document.cancelId as string)) {
return true;
}
return false;
},
fields: [
defineField({
name: "cancleId",
name: "cancelId",
type: "string",
hidden: true,
}),
Expand Down

1 comment on commit cd00488

@vercel
Copy link

@vercel vercel bot commented on cd00488 Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.