diff options
Diffstat (limited to 'src/util.ts')
| -rw-r--r-- | src/util.ts | 9 |
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 |
