Skip to content

Commit 64b71d3

Browse files
committed
refactor: remover los datos hardcodeados
1 parent c3aa35d commit 64b71d3

2 files changed

Lines changed: 3 additions & 23 deletions

File tree

src/lib/state/simulaciones.svelte.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,8 @@ export type SimulacionKey = string;
2020
export type SimulacionesSerial = [SimulacionKey, Simulacion][];
2121
export type Simulaciones = SvelteMap<SimulacionKey, Simulacion>;
2222

23-
const DEMO_SIMULACIONES: Simulaciones = new SvelteMap(
24-
[
25-
{
26-
name: 'INF-134 - Peor Escenario',
27-
date: new SvelteDate('2026-06-03')
28-
},
29-
{
30-
name: 'Aproximación con Gamma 1.1',
31-
date: new SvelteDate('2026-05-28')
32-
},
33-
{
34-
name: 'Simulación Redes de Computadores',
35-
date: new SvelteDate('2026-05-15')
36-
}
37-
].map((sim, idx) => {
38-
const id = (idx + 1).toString();
39-
return [id, { ...sim, id }];
40-
})
41-
);
42-
4323
export class SimulacionesManager implements Serializable<SimulacionesSerial> {
44-
private _simulaciones = $state<Simulaciones>(new SvelteMap(DEMO_SIMULACIONES));
24+
private _simulaciones = $state<Simulaciones>(new SvelteMap());
4525
private _actual = $state<Simulacion>(DEFAULT_SIMULACION);
4626

4727
loadActual(newActual: Simulacion) {
@@ -68,7 +48,7 @@ export class SimulacionesManager implements Serializable<SimulacionesSerial> {
6848
}
6949
return;
7050
}
71-
this._simulaciones = new SvelteMap(DEMO_SIMULACIONES);
51+
this._simulaciones = new SvelteMap();
7252
this._actual = DEFAULT_SIMULACION;
7353
}
7454

src/routes/(app)/_components/Entornos.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
class="shrink-0 rounded-xl border border-dashed border-base-400 bg-base-100/20 p-6 text-center"
4747
>
4848
<span class="text-sm text-content opacity-40">
49-
No hay entornos locales<br />guardados aún
49+
No hay simulaciones<br />guardadas aún
5050
</span>
5151
</div>
5252
{:else}

0 commit comments

Comments
 (0)