From cc0fbd8e07c3d85400eaecbb2d4498d7108d3119 Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Wed, 13 Mar 2024 12:43:43 +0000 Subject: feat: use different header actions for each page --- src/util.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/util.ts') diff --git a/src/util.ts b/src/util.ts index 9f84ffe..f181289 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,2 +1,7 @@ -export const cls = (...classes: Array) => - classes.filter(c => c).join(' '); \ No newline at end of file +import { route } from 'preact-router'; +import PocketBase from 'pocketbase'; + +export const logOut = (pb: PocketBase) => { + pb.authStore.clear(); + route('/login'); +}; \ No newline at end of file -- cgit v1.2.3