Skip to content

Commit

Permalink
fix: remove unnecessary domain
Browse files Browse the repository at this point in the history
  • Loading branch information
diogogmatos committed Jan 14, 2024
1 parent a86a90d commit 256a7ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions components/Notifications/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ const Banner = ({

// Fetch event data using the API
async function getData(): Promise<INotDTO[]> {
const domain = window.location.origin;
const response = await fetch(`${domain}/api/transfer/notifications`);
const response = await fetch(`/api/transfer/notifications`);
const data = await response.text();
const notifications: INotDTO[] = JSON.parse(data);
return notifications;
Expand Down
3 changes: 1 addition & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ const luKey = "lastUpdateEvents";

// Fetch event data using the API
async function getData(): Promise<IEventDTO[]> {
const domain = window.location.origin;
const response = await fetch(`${domain}/api/transfer/events`);
const response = await fetch(`/api/transfer/events`);
const data = await response.text();
const events: IEventDTO[] = JSON.parse(data);
return events;
Expand Down

0 comments on commit 256a7ea

Please sign in to comment.