mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #224 from omnivore-app/fix/rm-share-info
Remove unused shareInfo from GQL queries
This commit is contained in:
commit
fcabd795b2
5 changed files with 2 additions and 28 deletions
|
|
@ -23,9 +23,7 @@ export function ArticleHighlights(props: ArticleHighlightsProps): JSX.Element {
|
|||
<PrimaryLayout
|
||||
pageMetaDataProps={{
|
||||
title: props.publicArticle.title,
|
||||
description:
|
||||
props.publicArticle.shareInfo?.description ||
|
||||
props.publicArticle.description,
|
||||
description: props.publicArticle.description,
|
||||
path: router.pathname,
|
||||
ogImage: props.previewImagePath,
|
||||
ogImageType: 'image/png',
|
||||
|
|
|
|||
|
|
@ -44,17 +44,11 @@ export type ArticleAttributes = {
|
|||
slug: string
|
||||
savedByViewer?: boolean
|
||||
content: string
|
||||
shareInfo?: ArticleShareInfo
|
||||
highlights: Highlight[]
|
||||
linkId: string
|
||||
labels?: Label[]
|
||||
}
|
||||
|
||||
type ArticleShareInfo = {
|
||||
title?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
const query = gql`
|
||||
query GetArticle(
|
||||
$username: String!
|
||||
|
|
@ -66,10 +60,6 @@ const query = gql`
|
|||
article {
|
||||
...ArticleFields
|
||||
content
|
||||
shareInfo {
|
||||
title
|
||||
description
|
||||
}
|
||||
highlights(input: { includeFriends: $includeFriendsHighlights }) {
|
||||
...HighlightFields
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,10 +67,6 @@ export function useGetArticleSavingStatus({
|
|||
article {
|
||||
...ArticleFields
|
||||
content
|
||||
shareInfo {
|
||||
title
|
||||
description
|
||||
}
|
||||
highlights(input: { includeFriends: false }) {
|
||||
...HighlightFields
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,15 +33,9 @@ export type PublicArticleAttributes = {
|
|||
image?: string
|
||||
description?: string
|
||||
hasContent?: boolean
|
||||
shareInfo?: PublicArticleShareInfo
|
||||
highlights: Highlight[]
|
||||
}
|
||||
|
||||
type PublicArticleShareInfo = {
|
||||
title?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export const PublicArticleGQLFragment = gql`
|
||||
fragment PublicArticle on Article {
|
||||
id
|
||||
|
|
@ -54,10 +48,6 @@ export const PublicArticleGQLFragment = gql`
|
|||
savedByViewer
|
||||
postedByViewer
|
||||
hasContent
|
||||
shareInfo {
|
||||
title
|
||||
description
|
||||
}
|
||||
highlights {
|
||||
id
|
||||
shortId
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default function Home(): JSX.Element {
|
|||
pageMetaDataProps={{
|
||||
title: article.title,
|
||||
path: router.pathname,
|
||||
description: article.shareInfo?.description || article.description,
|
||||
description: article.description,
|
||||
}}
|
||||
>
|
||||
<Toaster />
|
||||
|
|
|
|||
Loading…
Reference in a new issue