Skip to content

Commit

Permalink
Svelte plugin is a prettier wrapper!! so we need a prettierrc configu…
Browse files Browse the repository at this point in the history
…ration file
  • Loading branch information
fdodino committed Dec 11, 2024
1 parent f8251e2 commit 047b0e9
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 34 deletions.
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"tabWidth": 2,
"singleQuote": true
}
68 changes: 34 additions & 34 deletions src/routes/pais/[code]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
<script lang="ts">
import './pais.css'
import { formatearEntero } from '$lib/utils'
import { goto } from '$app/navigation'
import './pais.css'
import { formatearEntero } from '$lib/utils'
import { goto } from '$app/navigation'
import Bandera from '$lib/Bandera.svelte'
let { data } = $props()
const { pais } = data
const volver = () => {
goto('/')
}
let { data } = $props()
const { pais } = data
const volver = () => {
goto('/')
}
</script>

<div class="pais_page">
<div class="titulo">
<Bandera bandera={pais.bandera}/>
<h2>{pais.nombre}</h2>
</div>
<div class="pais_single">
<div><span>Capital: </span>{pais.capital}</div>
<div><span>Moneda:</span>{pais.moneda}</div>
<div>
<span>Superficie:</span>{formatearEntero(pais.area)} km<sup>2</sup>
</div>
<div class="poblacion">
<span>Población:</span>{formatearEntero(pais.poblacion)}
{#if pais.superpoblado()}
<img
alt="está superpoblado"
title="está superpoblado"
src="/crowd.png"
class="superpoblado"
/>
{/if}
</div>
<div><span>Código de país:</span>{pais.codigo}</div>
<div title={pais.timezone}><span>Qué hora es:</span>{pais.queHoraEs()}</div>
</div>
<button data-testid="volver" class="botonera" onclick={volver}>Volver</button>
<div class="titulo">
<Bandera bandera={pais.bandera} />
<h2>{pais.nombre}</h2>
</div>
<div class="pais_single">
<div><span>Capital: </span>{pais.capital}</div>
<div><span>Moneda:</span>{pais.moneda}</div>
<div>
<span>Superficie:</span>{formatearEntero(pais.area)} km<sup>2</sup>
</div>
<div class="poblacion">
<span>Población:</span>{formatearEntero(pais.poblacion)}
{#if pais.superpoblado()}
<img
alt="está superpoblado"
title="está superpoblado"
src="/crowd.png"
class="superpoblado"
/>
{/if}
</div>
<div><span>Código de país:</span>{pais.codigo}</div>
<div title={pais.timezone}><span>Qué hora es:</span>{pais.queHoraEs()}</div>
</div>
<button data-testid="volver" class="botonera" onclick={volver}>Volver</button>
</div>

0 comments on commit 047b0e9

Please sign in to comment.