Skip to content

Commit

Permalink
remove unused file
Browse files Browse the repository at this point in the history
  • Loading branch information
ttwishing committed Oct 25, 2024
1 parent eae4872 commit fcc2ab5
Show file tree
Hide file tree
Showing 24 changed files with 36 additions and 1,063 deletions.
21 changes: 7 additions & 14 deletions src/routes/[network]/(account)/resources/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,15 @@
import type { UnicoveContext } from '$lib/state/client.svelte';
import { getContext } from 'svelte';
import { ResourceType } from './types';
import { ResourceState } from './state.svelte';
import { calAvailableSize } from './utils';
const { data } = $props();
const context = getContext<UnicoveContext>('state');
const ramState = $state(new ResourceState(ResourceType.RAM));
const cpuState = $state(new ResourceState(ResourceType.CPU));
const netState = $state(new ResourceState(ResourceType.NET));
$effect(() => {
ramState.setResource(context.account?.ram);
cpuState.setResource(context.account?.cpu);
netState.setResource(context.account?.net);
});
const ramAvailableSize = $derived(calAvailableSize(context.account?.ram));
const cpuAvailableSize = $derived(calAvailableSize(context.account?.cpu));
const netAvailableSize = $derived(calAvailableSize(context.account?.net));
const network = String(data.network);
const chainName = data.network.chain.name;
Expand Down Expand Up @@ -85,8 +78,8 @@
<Stack class="max-w-lg flex-1 gap-9">
<Stack>
<CpuAndNetOverview
cpuAvailable={cpuState.availableSize}
netAvailable={netState.availableSize}
cpuAvailable={cpuAvailableSize}
netAvailable={netAvailableSize}
{precision}
/>
{#if data.network.supports('powerup')}
Expand All @@ -104,7 +97,7 @@
{/if}
</Stack>
<Stack>
<RamOverview ramAvailable={ramState.availableSize} {precision} />
<RamOverview ramAvailable={ramAvailableSize} {precision} />
<Button variant="secondary" href="/{network}/ram">RAM Market</Button>
</Stack>
</Stack>
Expand Down

This file was deleted.

134 changes: 0 additions & 134 deletions src/routes/[network]/(account)/resources/components/forms/rex.svelte

This file was deleted.

Loading

0 comments on commit fcc2ab5

Please sign in to comment.