From a9c91faaf3e616f8aad1c738d515b4b0042bd470 Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Thu, 23 Mar 2023 17:28:14 +0530 Subject: [PATCH] fix: use prod api Signed-off-by: Ameya Shenoy --- web/app/components/BankAccounts.tsx | 2 +- web/app/components/CenterLoading.tsx | 2 +- web/app/components/Dashboard.tsx | 2 +- web/app/components/RecentTransactionsList.tsx | 2 +- web/app/components/Upcoming.tsx | 2 +- web/next.config.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/app/components/BankAccounts.tsx b/web/app/components/BankAccounts.tsx index 5937356..4877cb4 100644 --- a/web/app/components/BankAccounts.tsx +++ b/web/app/components/BankAccounts.tsx @@ -36,7 +36,7 @@ export default function BankAccounts({ bankDetails }) { bankAccounts.push( fetch(...args).then((res) => res.json()) - const { data, error } = useSWR(`http://localhost:8000/api/v1/accounts/`, fetcher) + const { data, error } = useSWR(`https://api.foldbank.codingcoffee.me/api/v1/accounts/`, fetcher) if (error) return
Error: Failed to load
if (!data) return
diff --git a/web/app/components/Dashboard.tsx b/web/app/components/Dashboard.tsx index 96d679d..d1e89e0 100644 --- a/web/app/components/Dashboard.tsx +++ b/web/app/components/Dashboard.tsx @@ -14,7 +14,7 @@ export default function Dashboard({ bankDetails }) { total_balance += bank.balance banks.push( diff --git a/web/app/components/RecentTransactionsList.tsx b/web/app/components/RecentTransactionsList.tsx index 3408f5c..19317d8 100644 --- a/web/app/components/RecentTransactionsList.tsx +++ b/web/app/components/RecentTransactionsList.tsx @@ -6,7 +6,7 @@ import SingleTransaction from './SingleTransaction' export default function RecentTransactionsList() { const fetcher = (...args) => fetch(...args).then((res) => res.json()) - const { data, error } = useSWR(`http://localhost:8000/api/v1/transactions/`, fetcher) + const { data, error } = useSWR(`https://api.foldbank.codingcoffee.me/api/v1/transactions/`, fetcher) if (error) return
Error: Failed to load
if (!data) return
diff --git a/web/app/components/Upcoming.tsx b/web/app/components/Upcoming.tsx index e8749bd..67bb6cc 100644 --- a/web/app/components/Upcoming.tsx +++ b/web/app/components/Upcoming.tsx @@ -9,7 +9,7 @@ import RecurringPayment from './RecurringPayment' export default function Upcoming() { const fetcher = (...args) => fetch(...args).then((res) => res.json()) - const { data, error } = useSWR(`http://localhost:8000/api/v1/recurringPayments/upcoming/`, fetcher) + const { data, error } = useSWR(`https://api.foldbank.codingcoffee.me/api/v1/recurringPayments/upcoming/`, fetcher) if (error) return
Error: Failed to load
if (!data) return
diff --git a/web/next.config.js b/web/next.config.js index 5f724cd..65b118d 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -13,7 +13,7 @@ const nextConfig = { }, { protocol: 'https', - hostname: 'foldbank.codingcoffee.me', + hostname: 'api.foldbank.codingcoffee.me', port: '', pathname: '/**', },