improves handling of user data

This commit is contained in:
Ollie Taylor
2023-02-25 18:25:59 +00:00
parent 4be36ba047
commit 7cad6ee1d6
23 changed files with 154 additions and 226 deletions
+4
View File
@@ -0,0 +1,4 @@
export const get_pathname_from_url = (src: string) => {
if (src.startsWith('http')) return new URL(src).pathname;
else return new URL(src, 'https://svelte.dev').pathname;
};
-1
View File
@@ -1,2 +1 @@
export * from './seconds-to-timestamp';
export * from './use-state';
-7
View File
@@ -1,7 +0,0 @@
import { user_preferences } from '$lib/preferences';
import { podcast_progress } from '$lib/progress';
export function load_podcast_state() {
podcast_progress.load();
user_preferences.load();
}