Skip to content

Commit a196cd2

Browse files
authored
fix: fix examples' code links (#39)
1 parent 8049fe9 commit a196cd2

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

apps/sdk-explorer/src/examples/document-collections/DocumentSearch/DocumentSearch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function DocumentSearch(): JSX.Element {
5454
<ExampleLayout
5555
title="Document search"
5656
hooks={[documents, projection]}
57-
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/document-collections/DocumentSearch/DocumentSearch.tsx"
57+
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/examples/document-collections/DocumentSearch/DocumentSearch.tsx"
5858
styling="Sanity UI"
5959
summary="This example passes a state variable to the useDocuments hook’s ‘search’ argument, enabling the creation of a dynamic search interface for documents in the targeted dataset(s). (Note: the ‘search’ parameter currently searches for matches across all of a document’s string fields.)"
6060
>

apps/sdk-explorer/src/examples/document-collections/DocumentTable/DocumentTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function DocumentTable(): JSX.Element {
6363
return (
6464
<ExampleLayout
6565
title="Document table"
66-
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/document-collections/DocumentTable/DocumentTable.tsx"
66+
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/examples/document-collections/DocumentTable/DocumentTable.tsx"
6767
hooks={[paginatedDocuments, projection]}
6868
styling="Tailwind"
6969
summary="This example uses the usePaginatedDocuments hook to retrieve a paginated collection of documents with six items per page, in addition to state and functions to control the pagination. The useProjection hook is used to retrieve contents and create projections from each document. Each document and its content and projections are then rendered in a table row."

apps/sdk-explorer/src/examples/document-collections/PreviewGrid/PreviewGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function PreviewGrid(): JSX.Element {
7777
return (
7878
<ExampleLayout
7979
title="Preview grid"
80-
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/document-collections/PreviewGrid/PreviewGrid.tsx"
80+
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/examples/document-collections/PreviewGrid/PreviewGrid.tsx"
8181
hooks={[documents, projection]}
8282
styling="Tailwind"
8383
summary="This example uses the useDocuments hook to retrieve a collection of documents. That collection is then mapped over, with each document passed to a component that uses the useProjection hook to retrieve each document’s title and poster image, and to create a projection of the first three listed cast members. The results are displayed in a grid."

apps/sdk-explorer/src/examples/document-collections/PreviewList/PreviewList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function PreviewList(): JSX.Element {
7878
return (
7979
<ExampleLayout
8080
title="Preview list"
81-
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/document-collections/PreviewList/PreviewList.tsx"
81+
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/examples/document-collections/PreviewList/PreviewList.tsx"
8282
hooks={[documents, projection]}
8383
styling="Sanity UI"
8484
summary="This example uses the useDocuments hook to retrieve a collection of documents. That collection is then mapped over, with each document passed to a component that uses the useProjection hook to retrieve each document’s title and poster image, and to create a projection of the first three listed cast members."

apps/sdk-explorer/src/examples/groq/MoviesByActor/MoviesByActor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function MoviesByActor(): JSX.Element {
5151
return (
5252
<ExampleLayout
5353
title="Movies by actor"
54-
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/groq/MoviesByActor/MoviesByActor.tsx"
54+
codeUrl="https://github.com/sanity-io/sdk-examples/blob/main/apps/sdk-explorer/src/examples/groq/MoviesByActor/MoviesByActor.tsx"
5555
hooks={[query]}
5656
styling="Sanity UI"
5757
summary="This example uses two instances of the useQuery hook. The first executes a GROQ query to look for entries of type ‘person’ in our dataset and filters those entries down to those who are referenced in at least 2 movie entries’ ‘castMembers’ field. For each of those results, we return a projection that includes the person’s name, photo, and document ID. The second useQuery hook executes a GROQ query for the movies the selected person has starred in, and returns the title, poster image, release date, and document ID for each."

0 commit comments

Comments
 (0)