Skip to content

Commit 6a480c1

Browse files
committed
Use the autoRevalidate hook for live reloading of the deployments page
1 parent fb59079 commit 6a480c1

File tree

2 files changed

+3
-1
lines changed
  • apps/webapp/app/routes
    • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam
    • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments

2 files changed

+3
-1
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { typedjson, useTypedLoaderData } from "remix-typedjson";
44
import { ExitIcon } from "~/assets/icons/ExitIcon";
55
import { GitMetadata } from "~/components/GitMetadata";
66
import { RuntimeIcon } from "~/components/RuntimeIcon";
7-
import { UserAvatar } from "~/components/UserProfilePhoto";
87
import { AdminDebugTooltip } from "~/components/admin/debugTooltip";
98
import { EnvironmentCombo } from "~/components/environments/EnvironmentLabel";
109
import { Badge } from "~/components/primitives/Badge";

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ import {
6161
} from "~/utils/pathBuilder";
6262
import { createSearchParams } from "~/utils/searchParams";
6363
import { compareDeploymentVersions } from "~/v3/utils/deploymentVersions";
64+
import { useAutoRevalidate } from "~/hooks/useAutoRevalidate";
6465

6566
export const meta: MetaFunction = () => {
6667
return [
@@ -144,6 +145,8 @@ export default function Page() {
144145
const location = useLocation();
145146
const navigate = useNavigate();
146147

148+
useAutoRevalidate({ interval: 5000, onFocus: true });
149+
147150
// If we have a selected deployment from the version param, show it
148151
useEffect(() => {
149152
if (selectedDeployment && !deploymentParam) {

0 commit comments

Comments
 (0)