Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
fix: project public image (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: HideBa <49897538+HideBa@users.noreply.github.com>
  • Loading branch information
rot1024 and HideBa committed Jul 16, 2021
1 parent 90c37de commit 91b5eea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ export type Props = {
id: string;
publicTitle: string;
publicDescription: string;
publicImageUrl?: string;
publicImage?: string;
};
assets?: Asset[];
updatePublicTitle?: (title: string) => void;
updatePublicDescription?: (description: string) => void;
updatePublicImage?: (imageUrl: string | null) => void;
assets?: Asset[];
createAssets?: (files: FileList) => Promise<void>;
};

Expand Down Expand Up @@ -56,7 +56,7 @@ const PublicSection: React.FC<Props> = ({
<EditableItem
title={intl.formatMessage({ defaultMessage: "Thumbnail" })}
onSubmit={updatePublicImage}
imageSrc={currentProject?.publicImageUrl as string}
imageSrc={currentProject?.publicImage}
isImage
onEditStart={() => openAssetModal()}
onEditCancel={() => closeAssetModal()}
Expand All @@ -69,7 +69,7 @@ const PublicSection: React.FC<Props> = ({
fileType="image"
onCreateAsset={createAssets}
onSelect={updatePublicImage}
value={currentProject?.publicImageUrl as string | undefined}
value={currentProject?.publicImage}
/>
</Wrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/Settings/Project/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const UPDATE_PROJECT = gql`
$imageUrl: URL
$publicTitle: String
$publicDescription: String
$publicImage: Upload
$publicImage: String
) {
updateProject(
input: {
Expand Down
6 changes: 3 additions & 3 deletions src/gql/graphql-client-api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ export type UpdateProjectInput = {
imageUrl?: Maybe<Scalars['URL']>;
publicTitle?: Maybe<Scalars['String']>;
publicDescription?: Maybe<Scalars['String']>;
publicImage?: Maybe<Scalars['Upload']>;
publicImage?: Maybe<Scalars['String']>;
publicNoIndex?: Maybe<Scalars['Boolean']>;
deleteImageUrl?: Maybe<Scalars['Boolean']>;
deletePublicImage?: Maybe<Scalars['Boolean']>;
Expand Down Expand Up @@ -3750,7 +3750,7 @@ export type UpdateProjectMutationVariables = Exact<{
imageUrl?: Maybe<Scalars['URL']>;
publicTitle?: Maybe<Scalars['String']>;
publicDescription?: Maybe<Scalars['String']>;
publicImage?: Maybe<Scalars['Upload']>;
publicImage?: Maybe<Scalars['String']>;
}>;


Expand Down Expand Up @@ -7498,7 +7498,7 @@ export type UpdateProjectBasicAuthMutationHookResult = ReturnType<typeof useUpda
export type UpdateProjectBasicAuthMutationResult = Apollo.MutationResult<UpdateProjectBasicAuthMutation>;
export type UpdateProjectBasicAuthMutationOptions = Apollo.BaseMutationOptions<UpdateProjectBasicAuthMutation, UpdateProjectBasicAuthMutationVariables>;
export const UpdateProjectDocument = gql`
mutation updateProject($projectId: ID!, $name: String, $description: String, $imageUrl: URL, $publicTitle: String, $publicDescription: String, $publicImage: Upload) {
mutation updateProject($projectId: ID!, $name: String, $description: String, $imageUrl: URL, $publicTitle: String, $publicDescription: String, $publicImage: String) {
updateProject(
input: {projectId: $projectId, name: $name, description: $description, imageUrl: $imageUrl, publicTitle: $publicTitle, publicDescription: $publicDescription, publicImage: $publicImage}
) {
Expand Down
2 changes: 1 addition & 1 deletion src/gql/graphql.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14172,7 +14172,7 @@
"description": null,
"type": {
"kind": "SCALAR",
"name": "Upload",
"name": "String",
"ofType": null
},
"defaultValue": null,
Expand Down

0 comments on commit 91b5eea

Please sign in to comment.