añadido componente para crear posts y modificado menu auth

This commit is contained in:
2025-11-23 17:42:52 -03:00
parent e677e83f27
commit 3fbacce3fe
24 changed files with 618 additions and 122 deletions
+10 -1
View File
@@ -1,7 +1,16 @@
import { writable } from 'svelte/store';
import { browser } from '$app/environment';
import type { Sesion } from '../../types';
export const currentSesion = writable<Sesion| null>(null);
const initialValue = browser ? JSON.parse(localStorage.getItem('sesion') || 'null') : null;
export const currentSesion = writable<Sesion | null>(initialValue);
if (browser) {
currentSesion.subscribe((value) => {
localStorage.setItem('sesion', JSON.stringify(value));
});
}
export const sesionStore = {
subscribe: currentSesion.subscribe,