Skip to content

Commit

Permalink
Merge pull request #89
Browse files Browse the repository at this point in the history
fix/no-ref/fix-missing-load-more-button
  • Loading branch information
botmaster authored Feb 12, 2024
2 parents e83c178 + 276857a commit 697589d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions content/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tools. I have an interest in graphic design and music.
::Sheetelevation
### Last experience

Senior frontend software engineer at <img src="/images/content/jsk.png" alt="Jellysmack logo" width="64" height="64" class="inline-block w-[1.3em] !mb-0"> [Jellysmack](https://jellysmack.com/fr/){target="_blank" rel="noopener"} from March 2022 to November 2023.
Senior frontend software engineer at <img loading="lazy" src="/images/content/jsk.png" alt="Jellysmack logo" width="64" height="64" class="inline-block w-[1.3em] !mb-0"> [Jellysmack](https://jellysmack.com/fr/){target="_blank" rel="noopener"} from March 2022 to November 2023.
::

::Sheetelevation
Expand All @@ -67,7 +67,7 @@ Zégut PG is a web application that allows me to create Spotify playlists from t

[https://pascal-is-listening.onrender.com/](https://pascal-is-listening.onrender.com/){target="_blank" rel="noopener" loading="lazy"}

![Image 'pascal is listening'](/images/content/pascal-is-listening.webp){width="1024" height="620"}
![Image 'pascal is listening'](/images/content/pascal-is-listening.webp){width="1024" height="620" loading="lazy"}

Web application that displays the titles of the songs I'm listening to on Spotify.

Expand Down
2 changes: 1 addition & 1 deletion content/fr/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ outils. J'ai une appétence pour le graphisme et la musique.
::Sheetelevation
### Dernière expérience

Software engineer frontend sénior chez <img src="/images/content/jsk.png" alt="Logo Jellysmack" width="64" height="64" class="inline-block w-[1.3em] !mb-0"> [Jellysmack](https://jellysmack.com/fr/){target="_blank" rel="noopener"} de mars 2022 à novembre 2023.
Software engineer frontend sénior chez <img loading="lazy" src="/images/content/jsk.png" alt="Logo Jellysmack" width="64" height="64" class="inline-block w-[1.3em] !mb-0"> [Jellysmack](https://jellysmack.com/fr/){target="_blank" rel="noopener"} de mars 2022 à novembre 2023.
::

::Sheetelevation
Expand Down
9 changes: 2 additions & 7 deletions pages/readings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,9 @@ function clearFilters() {
function loadMore() {
isLoadingMore.value = true;
cursor.value = articlesStore.articlesResponse?.response.next_cursor || null;
cursor.value = articlesStore.articlesResponse?.response.response.next_cursor || null;
}
// Computed - Has more
const hasMore = computed<boolean>(() => {
return articlesStore.articlesResponse?.response.has_more || false;
});
// Computed - Map status color to tailwind color
const statusColor = computed<Record<string, string>>(() => {
return {
Expand Down Expand Up @@ -297,7 +292,7 @@ watch(

<!-- Load more and page size selector -->
<div class="mt-10 flex flex-col items-center gap-2 lg:flex-row">
<div v-if="hasMore" class="flex items-center gap-2 leading-none">
<div v-if="articlesStore.hasMore" class="flex items-center gap-2 leading-none">
<button :disabled="pending" class="group" @click="loadMore">
{{ t('common.loadMore') }}
<Icon class="ml-1 block transition-transform group-hover:animate-spin" name="material-symbols:refresh" />
Expand Down
6 changes: 6 additions & 0 deletions stores/articles.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ export const useArticlesStore = defineStore('articles', () => {
}
};

// Hase more
const hasMore = computed(() => {
return articlesResponse.value?.response.response.has_more;
});

return {
articlesResponse,
loading,
error,
fetchArticles,
hasMore,
};
});

Expand Down

0 comments on commit 697589d

Please sign in to comment.