update export button
This commit is contained in:
parent
dd13f00855
commit
b9a644c097
@ -2,8 +2,7 @@
|
||||
<script lang ='ts'>
|
||||
import { displayCompanyName, trendAnalysisComponent, stockTicker, etfTicker, cryptoTicker, assetType, getCache, setCache} from '$lib/store';
|
||||
import InfoModal from '$lib/components/InfoModal.svelte';
|
||||
//import Chart from '$lib/components/Chart.svelte';
|
||||
//import Lazy from 'svelte-lazy';
|
||||
|
||||
|
||||
let trendList = [];
|
||||
let isLoaded = false;
|
||||
|
||||
@ -720,7 +720,7 @@ async function initializePrice() {
|
||||
|
||||
async function exportData() {
|
||||
let exportList = [];
|
||||
if(data?.user?.tier === 'Pro') {
|
||||
if(data?.user) {
|
||||
const response = await fetch("/api/historical-price", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@ -764,7 +764,7 @@ async function exportData() {
|
||||
document.body.removeChild(a);
|
||||
|
||||
} else {
|
||||
toast.error('Only for Pro Members', {
|
||||
toast.error('Please Sign In', {
|
||||
style: 'border-radius: 200px; background: #333; color: #fff;'
|
||||
});
|
||||
}
|
||||
|
||||
@ -596,7 +596,7 @@ async function historicalPrice(timePeriod: string) {
|
||||
|
||||
async function exportData() {
|
||||
let exportList = [];
|
||||
if(data?.user?.tier === 'Pro') {
|
||||
if(data?.user) {
|
||||
const response = await fetch("/api/historical-price", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@ -640,7 +640,7 @@ async function exportData() {
|
||||
document.body.removeChild(a);
|
||||
|
||||
} else {
|
||||
toast.error('Only for Pro Members', {
|
||||
toast.error('Please Sign In', {
|
||||
style: 'border-radius: 200px; background: #333; color: #fff;'
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user