Skip to content

Commit

Permalink
chore: feedback Florian
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesoyres-cc committed Jan 11, 2024
1 parent 0fef6bc commit 19b66c5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion demo-smart/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<div class="context-buttons">
<button data-context='{}'>null</button>
<button data-context='{"apiConfig":{}}'>bad API config</button>
<button data-context='{"lang":"en", "limit": 5}'>article-liste</button>
<button data-context='{"lang":"en", "limit": 5}'>article-list</button>
<button data-context='{"ownerId":"orga_3547a882-d464-4c34-8168-add4b3e0c135","appId":"app_8f5610ab-1d9f-41b6-854f-85d9a115e417"}'>app-node</button>
<button data-context='{"ownerId":"orga_3547a882-d464-4c34-8168-add4b3e0c135","appId":"app_e048c5ba-dc84-4f01-a750-d053706805fd"}'>app-play</button>
<button data-context='{"ownerId":"orga_3547a882-d464-4c34-8168-add4b3e0c135","currentUserId":"user_d3d02829-8847-40ea-ab76-ada4e2f026c0"}'>ACME BAR</button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/cc-article-list/cc-article-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class CcArticleList extends LitElement {
` : ''}
${this.articles.state === 'loaded' ? html`
${this.articles.articles.map((article) => html`
${this.articles.value.map((article) => html`
<cc-article-card
banner=${article.banner}
title=${article.title ?? ''}
Expand Down
2 changes: 1 addition & 1 deletion src/components/cc-article-list/cc-article-list.smart.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defineSmartComponent({

fetchArticleList({ signal, lang, limit })
.then((articles) => {
updateComponent('articles', { state: 'loaded', articles });
updateComponent('articles', { state: 'loaded', value: articles });
})
.catch((error) => {
console.error(error);
Expand Down
6 changes: 3 additions & 3 deletions src/components/cc-article-list/cc-article-list.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const defaultStory = makeStory(conf, {
{
articles: {
state: 'loaded',
articles: ARTICLES,
value: ARTICLES,
},
},
],
Expand All @@ -89,7 +89,7 @@ export const dataLoaded = makeStory(conf, {
{
articles: {
state: 'loaded',
articles: ARTICLES,
value: ARTICLES,
},
},
],
Expand All @@ -99,7 +99,7 @@ export const simulationsWithSuccess = makeStory(conf, {
items: [{}],
simulations: [
storyWait(2000, ([component]) => {
component.articles = { state: 'loaded', articles: ARTICLES };
component.articles = { state: 'loaded', value: ARTICLES };
}),
],
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/cc-article-list/cc-article-list.types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface ArticleListStateError {

interface ArticleListStateLoaded {
state: 'loaded';
articles: Array<Article>;
value: Array<Article>;
}

interface Article {
Expand Down

0 comments on commit 19b66c5

Please sign in to comment.