fix environment issue

master
TZGyn 6 months ago
parent 8d0eb694ad
commit 2313e74f71

@ -0,0 +1,8 @@
export const load = async () => {
const url =
Bun.env.NODE_ENV === 'production'
? 'https://bybit.tzgyn.com'
: 'http://localhost:3000'
return { url }
}

@ -1,10 +1,6 @@
<script lang="ts">
import { env } from '$env/dynamic/private'
import { Button } from '$lib/components/ui/button'
const url =
env.NODE_ENV === 'production'
? 'https://bybit.tzgyn.com'
: 'http://localhost:3000'
let { data } = $props()
</script>
<Button href={url + '/bybit.csv'} download>Download</Button>
<Button href={data.url + '/bybit.csv'} download>Download</Button>

Loading…
Cancel
Save