Skip to content

Commit

Permalink
fix: add dateArchived to the exposed variable in the template
Browse files Browse the repository at this point in the history
  • Loading branch information
sywhb committed May 17, 2023
1 parent 2b3b0f3 commit 1a67d16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface Article {
wordsCount?: number;
readingProgressPercent: number;
isArchived: boolean;
archivedAt?: string;
}

export interface Label {
Expand Down Expand Up @@ -109,6 +110,7 @@ export const loadArticles = async (
wordsCount
isArchived
readingProgressPercent
archivedAt
highlights {
id
quote
Expand Down
2 changes: 2 additions & 0 deletions src/settings/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export type ArticleView =
wordsCount?: number;
readLength?: number;
state: string;
dateArchived?: string;
}
| FunctionMap;

Expand Down Expand Up @@ -251,6 +252,7 @@ export const renderArticleContnet = async (
wordsCount,
readLength,
state: getArticleState(article),
dateArchived: article.archivedAt,
...functionMap,
};
// Build content string based on template
Expand Down

0 comments on commit 1a67d16

Please sign in to comment.