migracion a svelte 5
Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')!,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user