Skip to content

Commit

Permalink
fix: svelte checks
Browse files Browse the repository at this point in the history
  • Loading branch information
martabal committed Jul 14, 2023
1 parent 0a0c699 commit d71b45e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions web/src/lib/components/layouts/user-page-layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
export let hidden = false;
export let fullscreen = false;
const done = async () => {
hidden = !hidden;
console.log(hidden);
};
const dispatch = createEventDispatcher();
const handleDoneClick = () => {
dispatch('doneClick');
Expand Down Expand Up @@ -47,7 +43,7 @@
>
<p class="font-medium">{title}</p>
{#if fullscreen}
<IconButton on:click={() => done()}>
<IconButton on:click={() => hidden != hidden}>
<div class="flex items-center">
<EyeOutline size="1em" />
<p class="ml-2">Show & hide faces</p>
Expand Down
4 changes: 2 additions & 2 deletions web/src/routes/(user)/people/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
});
const countHidden = (): number => {
return data.people.reduce((count: number, obj) => count + (!obj.isHidden ? 1 : 0), 0);
return data.people.reduce((count: number, obj: PersonResponseDto) => count + (!obj.isHidden ? 1 : 0), 0);
};
const handleDoneClick = async () => {
Expand Down Expand Up @@ -119,7 +119,7 @@
</div>
</div>
{/if}
{:else if data.people.length == 0 || countHidden() == 0}
{:else}
<div class="flex items-center place-content-center w-full min-h-[calc(66vh_-_11rem)] dark:text-white">
<div class="flex flex-col content-center items-center text-center">
<AccountOff size="3.5em" />
Expand Down

0 comments on commit d71b45e

Please sign in to comment.