Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pinnedIds to useProjectsWithOrders #2191

Merged
merged 6 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 212 additions & 4 deletions web-marketplace/sanity-graphql.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26189,7 +26189,7 @@
"args": [],
"type": {
"kind": "OBJECT",
"name": "TitleCustomBody",
"name": "HomePageProjectsSection",
"ofType": null
},
"isDeprecated": false,
Expand Down Expand Up @@ -26362,7 +26362,7 @@
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "TitleCustomBodyFilter",
"name": "HomePageProjectsSectionFilter",
"ofType": null
},
"defaultValue": null,
Expand Down Expand Up @@ -26410,6 +26410,163 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "HomePageProjectsSection",
"description": null,
"fields": [
{
"name": "_key",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "_type",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "titleCustomBody",
"description": null,
"args": [],
"type": {
"kind": "OBJECT",
"name": "TitleCustomBody",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "projects",
"description": null,
"args": [],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "Project",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "HomePageProjectsSectionFilter",
"description": null,
"fields": null,
"inputFields": [
{
"name": "_key",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "StringFilter",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "_type",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "StringFilter",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "titleCustomBody",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "TitleCustomBodyFilter",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "HomePageProjectsSectionSorting",
"description": null,
"fields": null,
"inputFields": [
{
"name": "_key",
"description": null,
"type": {
"kind": "ENUM",
"name": "SortOrder",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "_type",
"description": null,
"type": {
"kind": "ENUM",
"name": "SortOrder",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "titleCustomBody",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "TitleCustomBodySorting",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "HomePageSorting",
Expand Down Expand Up @@ -26517,7 +26674,7 @@
"description": null,
"type": {
"kind": "INPUT_OBJECT",
"name": "TitleCustomBodySorting",
"name": "HomePageProjectsSectionSorting",
"ofType": null
},
"defaultValue": null,
Expand Down Expand Up @@ -40942,7 +41099,7 @@
},
{
"name": "projectId",
"description": "on-chain project id",
"description": "on-chain project id, off-chain uuid or slug",
"args": [],
"type": {
"kind": "SCALAR",
Expand Down Expand Up @@ -66655,6 +66812,57 @@
}
],
"directives": [
{
"name": "crossDatasetReference",
"description": "Field references one or more document in another dataset",
"isRepeatable": false,
"locations": [
"OBJECT",
"FIELD_DEFINITION"
],
"args": [
{
"name": "dataset",
"description": "Dataset name",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "typeNames",
"description": "Strings of the target types names enabled for this reference",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
}
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
}
]
},
{
"name": "jsonAlias",
"description": "Field is a \"raw\" JSON alias for a different field",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function ProjectCardsSection({
onButtonClick && (() => onButtonClick({ project }))
}
purchaseInfo={project.purchaseInfo}
href={`/project/${project.id}`}
href={`/project/${project.slug ?? project.id}`}
target={'_self'}
imageStorageBaseUrl={IMAGE_STORAGE_BASE_URL}
apiServerUrl={API_URI}
Expand Down
46 changes: 39 additions & 7 deletions web-marketplace/src/generated/sanity-graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type Scalars = {




export type ActionCard = {
__typename?: 'ActionCard';
_key?: Maybe<Scalars['String']>;
Expand Down Expand Up @@ -3011,7 +3012,7 @@ export type HomePage = Document & {
_key?: Maybe<Scalars['String']>;
seo?: Maybe<Seo>;
heroSection?: Maybe<HomePageTopSection>;
projectsSection?: Maybe<TitleCustomBody>;
projectsSection?: Maybe<HomePageProjectsSection>;
creditClassesSection?: Maybe<TitleCustomBody>;
gettingStartedResourcesSection?: Maybe<GettingStartedResourcesSection>;
bottomBanner?: Maybe<BottomBanner>;
Expand All @@ -3028,12 +3029,32 @@ export type HomePageFilter = {
_key?: Maybe<StringFilter>;
seo?: Maybe<SeoFilter>;
heroSection?: Maybe<HomePageTopSectionFilter>;
projectsSection?: Maybe<TitleCustomBodyFilter>;
projectsSection?: Maybe<HomePageProjectsSectionFilter>;
creditClassesSection?: Maybe<TitleCustomBodyFilter>;
gettingStartedResourcesSection?: Maybe<GettingStartedResourcesSectionFilter>;
bottomBanner?: Maybe<BottomBannerFilter>;
};

export type HomePageProjectsSection = {
__typename?: 'HomePageProjectsSection';
_key?: Maybe<Scalars['String']>;
_type?: Maybe<Scalars['String']>;
titleCustomBody?: Maybe<TitleCustomBody>;
projects?: Maybe<Array<Maybe<Project>>>;
};

export type HomePageProjectsSectionFilter = {
_key?: Maybe<StringFilter>;
_type?: Maybe<StringFilter>;
titleCustomBody?: Maybe<TitleCustomBodyFilter>;
};

export type HomePageProjectsSectionSorting = {
_key?: Maybe<SortOrder>;
_type?: Maybe<SortOrder>;
titleCustomBody?: Maybe<TitleCustomBodySorting>;
};

export type HomePageSorting = {
_id?: Maybe<SortOrder>;
_type?: Maybe<SortOrder>;
Expand All @@ -3043,7 +3064,7 @@ export type HomePageSorting = {
_key?: Maybe<SortOrder>;
seo?: Maybe<SeoSorting>;
heroSection?: Maybe<HomePageTopSectionSorting>;
projectsSection?: Maybe<TitleCustomBodySorting>;
projectsSection?: Maybe<HomePageProjectsSectionSorting>;
creditClassesSection?: Maybe<TitleCustomBodySorting>;
bottomBanner?: Maybe<BottomBannerSorting>;
};
Expand Down Expand Up @@ -4707,7 +4728,7 @@ export type Project = Document & {
_rev?: Maybe<Scalars['String']>;
_key?: Maybe<Scalars['String']>;
projectName?: Maybe<Scalars['String']>;
/** on-chain project id */
/** on-chain project id, off-chain uuid or slug */
projectId?: Maybe<Scalars['String']>;
image?: Maybe<CustomImage>;
location?: Maybe<Scalars['String']>;
Expand Down Expand Up @@ -8084,8 +8105,14 @@ export type AllHomePageQuery = (
{ __typename?: 'GettingStartedResourcesSection' }
& GettingStartedResourcesSectionFieldsFragment
)>, projectsSection?: Maybe<(
{ __typename?: 'TitleCustomBody' }
& TitleCustomBodyFieldsFragment
{ __typename?: 'HomePageProjectsSection' }
& { titleCustomBody?: Maybe<(
{ __typename?: 'TitleCustomBody' }
& TitleCustomBodyFieldsFragment
)>, projects?: Maybe<Array<Maybe<(
{ __typename?: 'Project' }
& Pick<Project, 'projectId'>
)>>> }
)>, creditClassesSection?: Maybe<(
{ __typename?: 'TitleCustomBody' }
& TitleCustomBodyFieldsFragment
Expand Down Expand Up @@ -9956,7 +9983,12 @@ export const AllHomePageDocument = gql`
...gettingStartedResourcesSectionFields
}
projectsSection {
...titleCustomBodyFields
titleCustomBody {
...titleCustomBodyFields
}
projects {
projectId
}
}
creditClassesSection {
...titleCustomBodyFields
Expand Down
7 changes: 6 additions & 1 deletion web-marketplace/src/graphql/sanity/AllHomePage.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ query allHomePage {
...gettingStartedResourcesSectionFields
}
projectsSection {
...titleCustomBodyFields
titleCustomBody {
...titleCustomBodyFields
}
projects {
projectId
}
}
creditClassesSection {
...titleCustomBodyFields
Expand Down
Loading