How to Set Preview as Default View in Winston

1 replies
Last updated: Aug 18, 2022
Hi!
Is it possible to set a default view other than "Edit"? So that when I open Winston, "Preview" is shown instead of "Edit"?
Aug 18, 2022, 2:55 PM
already done πŸ˜„
My solution:

(deskStructure.js)

export const getDefaultDocumentNode = ({documentId, schemaType}) => {
      if (schemaType === "pet") {
        return S.document().views([
        S.view.component(NotePreview).title('Preview').icon(EyeOpenIcon),
          S.view.form(),
        ])
      }
    }
Aug 18, 2022, 3:37 PM

Sanity.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in