fix environment issue
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">
|
<script lang="ts">
|
||||||
import { env } from '$env/dynamic/private'
|
|
||||||
import { Button } from '$lib/components/ui/button'
|
import { Button } from '$lib/components/ui/button'
|
||||||
const url =
|
let { data } = $props()
|
||||||
env.NODE_ENV === 'production'
|
|
||||||
? 'https://bybit.tzgyn.com'
|
|
||||||
: 'http://localhost:3000'
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Button href={url + '/bybit.csv'} download>Download</Button>
|
<Button href={data.url + '/bybit.csv'} download>Download</Button>
|
||||||
|
|||||||
Loading…
Reference in New Issue