{#if $screenWidth >= 640} Search (searchBarTicker(searchQuery, assetType))} class="absolute inset-0 right-auto group" type="submit" aria-label="Search"> {#if $searchBarData?.length !== 0} {#if notFoundTicker} Oh snapp, ticker does not exist in our database {/if} {#if !showSuggestions} Popular {/if} {#if !showSuggestions } {#each popularList as item} popularTicker(item?.symbol, item?.assetType) } class="mb-2 {item?.symbol === focusedSuggestion ? 'shake-ticker cursor-pointer flex justify-start items-center p-2 text-white bg-[#404040] bg-opacity-[0.25] rounded group' : 'shake-ticker cursor-pointer bg-[#09090B] sm:hover:bg-[#17171A] rounded-lg flex justify-start items-center p-2 text-white group'} w-full"> {item?.symbol} {item?.name.length > 150 ? item?.name?.slice(0,150) + "..." : item?.name} {item?.type} {/each} {:else if showSuggestions && searchResults?.length > 0} Suggestions {#each searchResults as item} (searchBarTicker(item?.symbol, item?.type))} class="mb-2 {item?.symbol === focusedSuggestion ? 'shake-ticker cursor-pointer flex justify-start items-center p-2 text-white bg-[#404040] bg-opacity-[0.25] rounded group' : 'cursor-pointer mb-2 bg-[#09090B] sm:hover:bg-[#17171A] rounded-lg flex justify-start items-center p-2 text-white group'}"> {item?.symbol} {item?.name?.length > 150 ? item?.name?.slice(0,150) + "..." : item?.name} {item?.type} {/each} {:else if showSuggestions && searchResults?.length === 0} No results found {/if} {:else} {/if} Return {:else}
Oh snapp, ticker does not exist in our database