empiezo migracion svelte 5

Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
2024-10-31 19:22:27 -03:00
parent 34c995d5f9
commit 76e53d6f28
14 changed files with 434 additions and 7 deletions

View File

@@ -1,10 +1,36 @@
<script lang="ts">
import { Navbar, NavbarBrand, NavbarToggler, NavItem, Nav, NavLink, Collapse } from "@sveltestrap/sveltestrap";
import { onMount } from "svelte";
import { navigate } from "svelte-routing";
let isOpen = false;
function handleUpdate(event) {
function handleUpdate(event: any) {
isOpen = event.detail.isOpen;
}
let permisos = $state()
async function obtenerPermisos(){
try {
const response = await fetch("http://localhost:5007/api/acciones",{
method: 'POST',
headers: {
'Content-Type' : "application/json"
},
credentials: 'include'
});
if (response.ok){
permisos = response.json();
}
} catch (e) {
console.error(e);
navigate("/");
}
}
onMount(async () => {
})
</script>
<Navbar container="xxl" expand="md" color="dark-subtle">