From 85045d7fb98ddee9124f118a4154d302f48b9a78 Mon Sep 17 00:00:00 2001 From: zugdev Date: Thu, 5 Dec 2024 20:10:10 -0300 Subject: [PATCH] feat: unify notifications fetch --- src/home/home.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/home/home.ts b/src/home/home.ts index e6e6a18..9ec9b46 100644 --- a/src/home/home.ts +++ b/src/home/home.ts @@ -1,7 +1,7 @@ import { grid } from "../the-grid"; import { authentication } from "./authentication"; import { displayNotifications } from "./fetch-github/fetch-and-display-previews"; -import { fetchIssueNotifications, fetchPullRequestNotifications } from "./fetch-github/fetch-data"; +import { fetchAllNotifications, fetchIssueNotifications, fetchPullRequestNotifications } from "./fetch-github/fetch-data"; import { readyToolbar } from "./ready-toolbar"; import { renderServiceMessage } from "./render-service-message"; import { renderErrorInModal } from "./rendering/display-popup-modal"; @@ -28,8 +28,7 @@ if (!notificationsContainer) { throw new Error("Could not find issues container"); } -export const pullRequestNotifications = void fetchPullRequestNotifications(); -export const issueNotifications = void fetchIssueNotifications(); +export const notifications = void fetchAllNotifications(); void (async function home() { void authentication();