fix(info): optimize effective local path retrieval in RepositoryInfoTabContent
This commit is contained in:
parent
c9dc663104
commit
4beb521c52
1 changed files with 5 additions and 2 deletions
|
|
@ -40,6 +40,9 @@ export const RepositoryInfoTabContent = ({ repository }: Props) => {
|
|||
);
|
||||
const [showConfirmDialog, setShowConfirmDialog] = useState(false);
|
||||
|
||||
const isImportedLocal = repository.type === "local" && repository.config.isExistingRepository;
|
||||
const effectiveLocalPath = getEffectiveLocalPath(repository);
|
||||
|
||||
const updateMutation = useMutation({
|
||||
...updateRepositoryMutation(),
|
||||
onSuccess: () => {
|
||||
|
|
@ -116,10 +119,10 @@ export const RepositoryInfoTabContent = ({ repository }: Props) => {
|
|||
<div className="text-sm font-medium text-muted-foreground">Status</div>
|
||||
<p className="mt-1 text-sm">{repository.status || "unknown"}</p>
|
||||
</div>
|
||||
{getEffectiveLocalPath(repository) && (
|
||||
{effectiveLocalPath && (
|
||||
<div className="md:col-span-2">
|
||||
<div className="text-sm font-medium text-muted-foreground">Effective Local Path</div>
|
||||
<p className="mt-1 text-sm font-mono">{getEffectiveLocalPath(repository)}</p>
|
||||
<p className="mt-1 text-sm font-mono">{effectiveLocalPath}</p>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue