refresh app (so code files is updated) on git checkout (#250)

This commit is contained in:
Will Chen
2025-05-26 11:58:18 -07:00
committed by GitHub
parent cdf2f5d772
commit e1344d55b0

View File

@@ -7,6 +7,7 @@ import type { Version } from "@/ipc/ipc_types";
import { cn } from "@/lib/utils";
import { useEffect, useRef, useState } from "react";
import { useCheckoutVersion } from "@/hooks/useCheckoutVersion";
import { useLoadApp } from "@/hooks/useLoadApp";
interface VersionPaneProps {
isVisible: boolean;
@@ -15,6 +16,7 @@ interface VersionPaneProps {
export function VersionPane({ isVisible, onClose }: VersionPaneProps) {
const appId = useAtomValue(selectedAppIdAtom);
const { refreshApp } = useLoadApp(appId);
const {
versions: liveVersions,
refreshVersions,
@@ -78,6 +80,7 @@ export function VersionPane({ isVisible, onClose }: VersionPaneProps) {
console.error("Could not checkout version, unselecting version", error);
setSelectedVersionId(null);
}
await refreshApp();
}
};