fix(flux-note): stop showing sign-in prompt while readme is loading

Cache miss wrote null into store.readme before getMainReadme finished,
collapsing isLoading and surfacing the not-accessible UI mid-fetch.
Also branch that UI on auth state so signed-in users aren't told to
sign in when access fails.
This commit is contained in:
Julien Calixte
2026-05-06 09:54:25 +02:00
parent 58568e2245
commit 30f200df30
2 changed files with 13 additions and 4 deletions

View File

@@ -166,8 +166,10 @@ export const useUserRepoStore = defineStore("USER_REPO_STATE", {
getCachedMainReadme(user, repo).then(async (cachedReadme) => {
if (requestId !== this._requestId) return
this.readme = cachedReadme
this.readme = await getMainReadme(user, repo)
if (cachedReadme) this.readme = cachedReadme
const fetched = await getMainReadme(user, repo)
if (requestId !== this._requestId) return
this.readme = fetched
})
},
addFile(file: RepoFile) {