🛹 Adds a persistentStore for location

This commit is contained in:
Rune Harlyk
2024-08-22 21:14:48 +02:00
committed by Rune Harlyk
parent 92184e9456
commit d77010ad41
4 changed files with 4 additions and 10 deletions
+1
View File
@@ -7,3 +7,4 @@ export * from './telemetry';
export * from './analytics';
export * from './user';
export * from './featureFlags';
export * from './location-store';
+3
View File
@@ -0,0 +1,3 @@
import { persistentStore } from '$lib/utilities';
export const location = persistentStore('location', '/');
-1
View File
@@ -4,7 +4,6 @@ export * from './svelte-utilities';
export * from './math-utilities';
export * from './buffer-utilities';
export * from './model-utilities';
export * from './location-utilities';
export * from './position-utilities';
export * from './string-utilities';
export * from './color-utilities';
@@ -1,9 +0,0 @@
export const hostname = 'localhost'; //window.location.hostname;
export const isSecure = true; // window.location.protocol === 'https:';
export const location = 'localhost:5173'; //window.location; //import.meta.env.VITE_API_URL.replace('hostname', hostname);
const socketScheme = isSecure ? 'wss://' : 'ws://';
export const socketLocation = socketScheme + location; // import.meta.env.VITE_SOCKET_URL.replace('hostname', hostname);