Fixed lodash library not invoking in production build (#171)

* Added staging docker-compose file
* Use lodash-es and remove hydration option on photos page fixed the problem
This commit is contained in:
Alex 2022-05-22 04:48:38 -05:00 committed by GitHub
parent baaf7ad153
commit ce06af0c9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 163 additions and 22 deletions

View file

@ -1,28 +1,27 @@
<script lang="ts">
// import { getRequest } from '$lib/api';
// import { onDestroy } from 'svelte';
// import { fade } from 'svelte/transition';
import { getRequest } from '$lib/api';
import { onDestroy } from 'svelte';
import '../app.css';
// import { serverEndpoint } from '../lib/constants';
import { serverEndpoint } from '../lib/constants';
// let endpoint = serverEndpoint;
// let isServerOk = true;
let endpoint = serverEndpoint;
let isServerOk = true;
// const pingServerInterval = setInterval(async () => {
// const response = await getRequest('server-info/ping', '');
const pingServerInterval = setInterval(async () => {
const response = await getRequest('server-info/ping', '');
// if (response.res === 'pong') isServerOk = true;
// if (response.statusCode === 404) isServerOk = false;
// }, 10000);
if (response.res === 'pong') isServerOk = true;
if (response.statusCode === 404) isServerOk = false;
}, 10000);
// onDestroy(() => clearInterval(pingServerInterval));
onDestroy(() => clearInterval(pingServerInterval));
</script>
<main>
<slot />
</main>
<!-- <footer
<footer
class="text-sm fixed bottom-0 h-8 flex place-items-center place-content-center bg-gray-50 w-screen font-mono gap-8 px-4 font-medium"
>
<p class="">
@ -36,4 +35,4 @@
<span class="text-red-500 font-bold">OFFLINE</span>
{/if}
</p>
</footer> -->
</footer>