{#if $screenWidth >= 640} Search searchBarTicker(searchQuery)} 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} {searchHistory?.length > 0 ? "Recent" : "Popular"} {/if} {#if !showSuggestions} {#each searchHistory?.length > 0 ? searchHistory : popularList as item} popularTicker(item?.symbol)} class="mb-2 {item?.symbol === focusedSuggestion ? 'shake-ticker cursor-pointer flex justify-start items-center p-2 text-white bg-[#27272A] rounded group' : 'shake-ticker cursor-pointer bg-[#09090B] sm:hover:bg-[#27272A] 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)} class="mb-2 {item?.symbol === focusedSuggestion ? 'shake-ticker cursor-pointer flex justify-start items-center p-2 text-white bg-[#27272A] rounded group' : 'cursor-pointer mb-2 bg-[#09090B] sm:hover:bg-[#27272A] 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