Skip to content

Commit

Permalink
Fix Empty Github .hompage on Github Cards component
Browse files Browse the repository at this point in the history
  • Loading branch information
AE517 committed Oct 21, 2024
1 parent f777034 commit 4021085
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 4 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion components/GithubCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<span><Icon name="mdi:github" size="35" /></span>
</a>
<a
v-if="repo.homepage !== null"
v-if="repo.homepage !== ''"
:href="repo.homepage"
target="_blank"
class="flex flex-row items-center gap-x-2 rounded-lg bg-sundress p-2 px-3 py-2 text-midnight lg:text-lg"
Expand Down
4 changes: 2 additions & 2 deletions pages/projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<GithubCard
v-for="(repo, index) in repositories"
:repo="repo"
:class="`animate-fade-up animate-delay-${500 * index}`"
class="animate-fade-up animate-delay-1000"
/>
</div>
</div>
Expand All @@ -24,7 +24,7 @@ definePageMeta({
const githubResponse: Array<object> = await githubApi();
const repositories: Array<object> = githubResponse.filter((item: any) => {
if (item.name !== 'Guilherme-HJA') return item;
if (item.name !== 'Guilherme-HJA') return item; // Github Config ignore
});
</script>

Expand Down
2 changes: 1 addition & 1 deletion utils/githubApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface Repo {
name: string;
url: string;
description: string;
homepage?: string; //Optional
homepage?: string; //Optional | On empty returns ''
language: string;
topics: Array<object>;
}
Expand Down

0 comments on commit 4021085

Please sign in to comment.