Skip to content

Commit

Permalink
chore: remove dead code
Browse files Browse the repository at this point in the history
some variables are checked but never assigned
reported with the new TypeScript version 5.4

Signed-off-by: Florent Benoit <[email protected]>
  • Loading branch information
benoitf committed Mar 12, 2024
1 parent 6b3f1f7 commit a5d0632
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ let initializeError: string | undefined = undefined;
let preflightChecks: CheckStatus[] = [];
let noErrors = true;
let logsXtermDiv: HTMLDivElement;
let logsTerminal;
Expand Down Expand Up @@ -104,8 +102,6 @@ onDestroy(() => {
style="background-color: {getPanelDetailColor()}; width: 100%; text-align: left; display: {initializeError
? 'block'
: 'none'}"
class:h-full="{noErrors === false}"
class:min-w-full="{noErrors === false}"
bind:this="{logsXtermDiv}">
</div>

Expand Down
4 changes: 0 additions & 4 deletions packages/renderer/src/lib/dashboard/ProviderInstalled.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ let initializeError: string | undefined = undefined;
let preflightChecks: CheckStatus[] = [];
let noErrors = true;
let logsXtermDiv: HTMLDivElement;
let logsTerminal: Terminal;
Expand Down Expand Up @@ -203,8 +201,6 @@ function onInstallationClick() {
style="background-color: {getPanelDetailColor()}; width: 100%; text-align: left; display: {initializeError
? 'block'
: 'none'}"
class:h-full="{noErrors === false}"
class:min-w-full="{noErrors === false}"
bind:this="{logsXtermDiv}">
</div>

Expand Down
13 changes: 1 addition & 12 deletions packages/renderer/src/lib/dialogs/MessageBox.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { onDestroy, onMount, tick } from 'svelte';
import { onDestroy, onMount } from 'svelte';
import Fa from 'svelte-fa';
import { faCircleQuestion, faCircle } from '@fortawesome/free-regular-svg-icons';
import { faCircleExclamation, faInfo, faTriangleExclamation } from '@fortawesome/free-solid-svg-icons';
Expand All @@ -21,7 +21,6 @@ let buttonOrder: number[];
let display = false;
let inputElement: HTMLInputElement | undefined = undefined;
let messageBox: HTMLDivElement;
const showMessageBoxCallback = (messageBoxParameter: unknown) => {
Expand Down Expand Up @@ -75,16 +74,6 @@ const showMessageBoxCallback = (messageBoxParameter: unknown) => {
});
display = true;
tick()
.then(() => {
if (display && inputElement) {
inputElement.focus();
}
})
.catch((error: unknown) => {
console.error('Unable to focus on input element', error);
});
};
onMount(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ let cancellableTokenId: number | undefined = undefined;
let providers: ProviderInfo[] = [];
let providerConnections: ProviderContainerConnectionInfo[] = [];
let selectedProvider: ProviderContainerConnectionInfo | undefined = undefined;
let selectedProviderConnection: ProviderContainerConnectionInfo | undefined = undefined;
let logsTerminal: Terminal;
$: hasInvalidFields = !containerFilePath || !containerBuildContextDirectory;
Expand Down Expand Up @@ -211,9 +210,6 @@ async function abortBuild() {
</select>
</label>
{/if}
{#if providerConnections.length === 1 && selectedProviderConnection}
<input type="hidden" name="providerChoice" readonly bind:value="{selectedProviderConnection.name}" />
{/if}
</div>

<div hidden="{buildImageInfo?.buildRunning}">
Expand Down

0 comments on commit a5d0632

Please sign in to comment.