Skip to content

Commit

Permalink
chore: simplify code and change quotes
Browse files Browse the repository at this point in the history
Remove '.length > 0' and changed quotes to make linter happy with itself.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
  • Loading branch information
deboer-tim committed Sep 20, 2023
1 parent 341d595 commit 75e18d1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/renderer/src/lib/ContainerList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ function errorCallback(container: ContainerInfoUI, errorMessage: string): void {
{#if providerConnections.length === 0}
<NoContainerEngineEmptyScreen />
{:else if $filtered.length === 0}
{#if searchTerm.length > 0}
{#if searchTerm}
<FilteredEmptyScreen icon="{ContainerIcon}" kind="containers" bind:searchTerm="{searchTerm}" />
{:else}
<ContainerEmptyScreen />
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/src/lib/ImagesList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function computeInterval(): number {
{#if providerConnections.length === 0}
<NoContainerEngineEmptyScreen />
{:else if $filtered.length === 0}
{#if searchTerm.length > 0}
{#if searchTerm}
<FilteredEmptyScreen icon="{ImageIcon}" kind="images" bind:searchTerm="{searchTerm}" />
{:else}
<ImageEmptyScreen />
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/src/lib/pod/PodsList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function errorCallback(pod: PodInfoUI, errorMessage: string): void {
{#if $filtered.length === 0 && providerConnections.length === 0}
<NoContainerEngineEmptyScreen />
{:else if $filtered.length === 0}
{#if searchTerm.length > 0}
{#if searchTerm}
<FilteredEmptyScreen icon="{PodIcon}" kind="pods" bind:searchTerm="{searchTerm}" />
{:else}
<PodEmptyScreen />
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/src/lib/ui/FilteredEmptyScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export let icon: any;
export let kind: string;
export let searchTerm: string;
$: filter = searchTerm && searchTerm.length > 20 ? 'filter' : "'" + searchTerm + "'";
$: filter = searchTerm && searchTerm.length > 20 ? 'filter' : `'` + searchTerm + `'`;
</script>

<EmptyScreen
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/src/lib/volume/VolumesList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function gotoCreateVolume(): void {
{#if providerConnections.length === 0}
<NoContainerEngineEmptyScreen />
{:else if $filtered.map(volumeInfo => volumeInfo.Volumes).flat().length === 0}
{#if searchTerm.length > 0}
{#if searchTerm}
<FilteredEmptyScreen icon="{VolumeIcon}" kind="volumes" bind:searchTerm="{searchTerm}" />
{:else}
<VolumeEmptyScreen />
Expand Down

0 comments on commit 75e18d1

Please sign in to comment.