migracion a svelte 5

Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
2024-10-31 19:24:56 -03:00
parent 76e53d6f28
commit e550952397
10 changed files with 28 additions and 22 deletions

View File

@@ -1,18 +1,22 @@
<script lang="ts">
import { Form, FormGroup, Input, Button} from "@sveltestrap/sveltestrap";
export let url: string
interface Props {
url: string;
}
let showAlert: boolean = false;
let errorMessage: string
let { url }: Props = $props();
let dni: number
let email: string
let contraseña: string
let nombre: string
let apellido: string
let domicilio: string
let celular: string
let showAlert: boolean = $state(false);
let errorMessage: string = $state()
let dni: number = $state()
let email: string = $state()
let contraseña: string = $state()
let nombre: string = $state()
let apellido: string = $state()
let domicilio: string = $state()
let celular: string = $state()
async function submitForm(event: any) {
event.preventDefault();

View File

@@ -1,6 +1,6 @@
<script lang="ts">
import { Navbar, NavbarBrand, NavbarToggler, NavItem, Nav, NavLink, Collapse } from "@sveltestrap/sveltestrap";
let isOpen = false;
let isOpen = $state(false);
function handleUpdate(event) {
isOpen = event.detail.isOpen;
}

View File

@@ -7,7 +7,7 @@
let isVerified = writable(false);
export let component;
let { component } = $props();
let redirect = window.location.pathname;
@@ -43,7 +43,8 @@
</div>
{:else}
{#if $isAuthenticated}
<svelte:component this={component}/>
{@const SvelteComponent = component}
<SvelteComponent/>
{:else}
{navigate('/')}
{/if}

View File

@@ -2,9 +2,9 @@
import { CardHeader, CardTitle, Button, Card, Input, Form, CardBody, FormGroup } from '@sveltestrap/sveltestrap';
import { navigate } from 'svelte-routing';
let email = ""
let contraseña = ""
let errorMessage = ""
let email = $state("")
let contraseña = $state("")
let errorMessage = $state("")
let showAlert = false;
// @ts-ignore

View File

@@ -1,7 +1,8 @@
//import './app.css'
import App from './App.svelte'
import { mount } from "svelte";
const app = new App({
const app = mount(App, {
target: document.getElementById('app')!,
})