mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix(frontend): inconsistent most recent repository list after page refresh (#11283)
This commit is contained in:
parent
f54a930081
commit
36b174bfb4
@ -117,9 +117,8 @@ export function GitRepoDropdown({
|
||||
const prioritizeRecentRepositories = useCallback(
|
||||
(repoList: GitRepository[]) => {
|
||||
const recentRepoIds = new Set(recentRepositories.map((repo) => repo.id));
|
||||
const recentRepos = repoList.filter((repo) => recentRepoIds.has(repo.id));
|
||||
const otherRepos = repoList.filter((repo) => !recentRepoIds.has(repo.id));
|
||||
return [...recentRepos, ...otherRepos];
|
||||
return [...recentRepositories, ...otherRepos];
|
||||
},
|
||||
[recentRepositories],
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user