summaryrefslogtreecommitdiff
path: root/src/util.ts
diff options
context:
space:
mode:
authorSam Nystrom <sam@samnystrom.dev>2024-03-13 12:43:43 +0000
committerSam Nystrom <sam@samnystrom.dev>2024-03-13 20:17:07 -0400
commitcc0fbd8e07c3d85400eaecbb2d4498d7108d3119 (patch)
tree00d8a80189fb2590afa7410bc9c2a37cd11df44f /src/util.ts
parent2e39671e683f2fdf5a94dafe8d49c4c5befa38c8 (diff)
feat: use different header actions for each page
Diffstat (limited to 'src/util.ts')
-rw-r--r--src/util.ts9
1 files changed, 7 insertions, 2 deletions
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<string | false | null | undefined>) =>
- 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