diff --git a/src/home/authentication.ts b/src/home/authentication.ts index 4e8fb1ae..01ff446f 100644 --- a/src/home/authentication.ts +++ b/src/home/authentication.ts @@ -4,6 +4,7 @@ import { getGitHubUser } from "./getters/get-github-user"; import { GitHubUser } from "./github-types"; import { displayGitHubUserInformation } from "./rendering/display-github-user-information"; import { renderGitHubLoginButton } from "./rendering/render-github-login-button"; +import { viewToggle } from "./fetch-github/fetch-and-display-previews"; export async function authentication() { const accessToken = await getGitHubAccessToken(); @@ -15,5 +16,6 @@ export async function authentication() { if (gitHubUser) { trackDevRelReferral(gitHubUser.login + "|" + gitHubUser.id); await displayGitHubUserInformation(gitHubUser); + viewToggle.disabled = false; } } diff --git a/src/home/fetch-github/fetch-and-display-previews.ts b/src/home/fetch-github/fetch-and-display-previews.ts index d47f53f9..3719b7ec 100644 --- a/src/home/fetch-github/fetch-and-display-previews.ts +++ b/src/home/fetch-github/fetch-and-display-previews.ts @@ -17,7 +17,7 @@ export type Options = { let isProposalOnlyViewer = false; // or proposal viewer -const viewToggle = document.getElementById("view-toggle"); +export const viewToggle = document.getElementById("view-toggle") as HTMLInputElement; if (!viewToggle) { throw new Error("Could not find view toggle"); } @@ -27,7 +27,6 @@ viewToggle.addEventListener("click", () => { applyAvatarsToIssues(); }); - export async function fetchAndDisplayPreviewsFromCache(sorting?: Sorting, options = { ordering: "normal" }) { let _cachedTasks = getLocalStore(GITHUB_TASKS_STORAGE_KEY) as TaskStorageItems; const _accessToken = await getGitHubAccessToken(); diff --git a/static/index.html b/static/index.html index 1013be45..926b7968 100644 --- a/static/index.html +++ b/static/index.html @@ -53,7 +53,7 @@ Ubiquity DAO | DevPoolUbiquity DAO | DevPool