mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
Add helper refreshHistory function
cgen-9b8ded7fbe3b469cb03fd4eb030c6756
This commit is contained in:
parent
755a440934
commit
1c9cbb2129
1 changed files with 6 additions and 0 deletions
|
|
@ -101,6 +101,12 @@ export function SwitchPage() {
|
|||
setEditorValue(content);
|
||||
}
|
||||
|
||||
async function refreshHistory(repoId: string, branchId: string) {
|
||||
const b = branches.find(x=>x.id===branchId);
|
||||
const list = await listCommitsReachable(repoId, b?.headCommitId);
|
||||
setHistory(list);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="switch-shell">
|
||||
<div className="switch-activity-bar" aria-label="Activity Bar">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue