diff --git a/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/deployments/components/table/components/domain_list.tsx b/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/deployments/components/table/components/domain_list.tsx
index 3e27dc6451..ba449b3e72 100644
--- a/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/deployments/components/table/components/domain_list.tsx
+++ b/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/deployments/components/table/components/domain_list.tsx
@@ -3,24 +3,21 @@ import { useProjectLayout } from "../../../../layout-provider";
type Props = {
deploymentId: string;
- // I couldn't figure out how to make the domains revalidate on a rollback
- // From my understanding it should already work, because we're using the
- // .util.refetch() in the trpc mutation, but it doesn't.
- // We need to investigate this later
- hackyRevalidateDependency?: unknown;
};
-export const DomainList = ({ deploymentId, hackyRevalidateDependency }: Props) => {
+export const DomainList = ({ deploymentId }: Props) => {
const { collections } = useProjectLayout();
- const domains = useLiveQuery(
- (q) =>
- q
- .from({ domain: collections.domains })
- .where(({ domain }) => eq(domain.deploymentId, deploymentId))
- .orderBy(({ domain }) => domain.domain, "asc"),
- [hackyRevalidateDependency],
+ const domains = useLiveQuery((q) =>
+ q
+ .from({ domain: collections.domains })
+ .where(({ domain }) => eq(domain.deploymentId, deploymentId))
+ .orderBy(({ domain }) => domain.domain, "asc"),
);
+ if (domains.isLoading || !domains.data.length) {
+ return