Add helper refreshHistory function

cgen-9b8ded7fbe3b469cb03fd4eb030c6756
This commit is contained in:
Builder.io 2025-09-17 10:02:18 +00:00
parent 755a440934
commit 1c9cbb2129

View file

@ -101,6 +101,12 @@ export function SwitchPage() {
setEditorValue(content); 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 ( return (
<div className="switch-shell"> <div className="switch-shell">
<div className="switch-activity-bar" aria-label="Activity Bar"> <div className="switch-activity-bar" aria-label="Activity Bar">