Skip to content

Commit

Permalink
feat(article): use Version.title as revision page title
Browse files Browse the repository at this point in the history
  • Loading branch information
robertu7 committed Mar 4, 2024
1 parent 21063b8 commit 5223800
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/views/ArticleDetail/Revision/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Versions from './Versions'
const articleRevisionPublicFragment = gql`
fragment ArticleRevisionPublicArticle on Article {
id
title
slug
mediaHash
state
Expand Down Expand Up @@ -46,7 +45,7 @@ const articleRevisionPublicFragment = gql`
const articleVersionFragment = gql`
fragment ArticleVersion on ArticleVersion {
id
# title
title
mediaHash
summary
createdAt
Expand Down
2 changes: 1 addition & 1 deletion src/views/ArticleDetail/Revision/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const BaseArticleDetailRevision = ({
} = (translationData?.version?.__typename === 'ArticleVersion' &&
translationData.version.translation) ||
{}
const title = translated && translatedTitle ? translatedTitle : article.title
const title = translated && translatedTitle ? translatedTitle : version.title
const summary =
translated && translatedSummary ? translatedSummary : version.summary
const originalContent = version.contents.html
Expand Down

0 comments on commit 5223800

Please sign in to comment.