clean code
This commit is contained in:
parent
9c2f81e462
commit
62b1b37a79
@ -1,23 +1,13 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|
||||||
import { searchBarData, stockTicker, etfTicker, cryptoTicker, userRegion, screenWidth} from '$lib/store';
|
import { searchBarData, stockTicker, etfTicker, cryptoTicker, screenWidth} from '$lib/store';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import Search from "lucide-svelte/icons/search";
|
import Search from "lucide-svelte/icons/search";
|
||||||
|
|
||||||
|
|
||||||
const usRegion = ['cle1','iad1','pdx1','sfo1'];
|
export let apiURL;
|
||||||
let apiURL;
|
export let apiKey;
|
||||||
let apiKey = import.meta.env.VITE_STOCKNEAR_API_KEY;
|
|
||||||
|
|
||||||
|
|
||||||
userRegion.subscribe(value => {
|
|
||||||
if (usRegion.includes(value)) {
|
|
||||||
apiURL = import.meta.env.VITE_USEAST_API_URL;
|
|
||||||
} else {
|
|
||||||
apiURL = import.meta.env.VITE_EU_API_URL;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
let assetType = '';
|
let assetType = '';
|
||||||
|
|
||||||
@ -547,14 +537,14 @@ $: {
|
|||||||
<!--Start Drawer Sidewise for mobile-->
|
<!--Start Drawer Sidewise for mobile-->
|
||||||
|
|
||||||
|
|
||||||
<div class="drawer drawer-end overflow-hidden" style="z-index: 9999">
|
<div class="drawer drawer-end overflow-hidden z-[999]" style="z-index: 9999">
|
||||||
<input id="searchBarModal" type="checkbox" class="drawer-toggle" bind:checked={searchBarModalChecked} />
|
<input id="searchBarModal" type="checkbox" class="drawer-toggle" bind:checked={searchBarModalChecked} />
|
||||||
|
|
||||||
<div class="drawer-side overflow-hidden">
|
<div class="drawer-side overflow-hidden z-[999]">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-box overflow-hidden rounded-xl bg-[#09090B] min-h-screen w-screen pt-10" >
|
<div class="modal-box z-[999] overflow-hidden rounded-xl bg-[#09090B] min-h-screen w-screen pt-10" >
|
||||||
|
|
||||||
|
|
||||||
<!-- Search layout -->
|
<!-- Search layout -->
|
||||||
|
|||||||
@ -630,7 +630,7 @@ $: {
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
-->
|
-->
|
||||||
<Searchbar />
|
<Searchbar apiURL={data?.apiURL} apiKey={data?.apiKey}/>
|
||||||
|
|
||||||
<NotificationBell
|
<NotificationBell
|
||||||
data={data}
|
data={data}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user