Skip to content

Commit be97b67

Browse files
committed
replace cloudDeployedAt checks with deploymentId
1 parent de3b8f0 commit be97b67

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ export type EngineInstance = {
1717
name: string;
1818
url: string;
1919
lastAccessedAt: string;
20-
cloudDeployedAt?: string;
2120
status:
2221
| "active"
2322
| "pending"
2423
| "requested"
2524
| "deploying"
2625
| "paymentFailed"
2726
| "deploymentFailed";
28-
deploymentId: string;
27+
deploymentId?: string;
2928
};
3029

3130
// Not checking for null token because the token is required the tanstack useQuery hook

apps/dashboard/src/components/engine/badges/version.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ export const EngineVersionBadge = ({
3131
const [isModalOpen, setModalOpen] = useState(false);
3232

3333
const currentVersion = healthQuery.data?.engineVersion ?? "...";
34-
const latestVersion = "v2.0.17";
35-
// DEBUG
36-
// const latestVersion = latestVersionQuery.data;
34+
const latestVersion = latestVersionQuery.data;
3735
const isStale = latestVersion && currentVersion !== latestVersion;
3836

3937
if (!isStale) {
@@ -89,7 +87,7 @@ const UpdateVersionModal = (props: {
8987
const { open, onOpenChange, latestVersion, instance } = props;
9088
const updateEngineServerMutation = useEngineUpdateServerVersion();
9189

92-
if (!instance.cloudDeployedAt) {
90+
if (!instance.deploymentId) {
9391
// For self-hosted, show a prompt to the Github release page.
9492
return (
9593
<Dialog open={open} onOpenChange={onOpenChange}>

apps/dashboard/src/components/engine/engine-instances-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ const RemoveModal = (props: {
288288
<Dialog open={open} onOpenChange={onOpenChange}>
289289
<DialogContent className="z-[10001]" dialogOverlayClassName="z-[10000]">
290290
{instance.status === "paymentFailed" ||
291-
(instance.status === "active" && !instance.cloudDeployedAt) ? (
291+
(instance.status === "active" && !instance.deploymentId) ? (
292292
<RemoveFromDashboardModalContent
293293
refetch={refetch}
294294
instance={instance}

0 commit comments

Comments
 (0)