Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 3 additions & 23 deletions frontend/src/components/actors/guard-connectable-inspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ function useActorEngineContext({ actorId }: { actorId: ActorId }) {
const provider = useEngineCompatDataProvider();

const actorContext = useMemo(() => {
return engineToken
? createInspectorActorContext({
return createInspectorActorContext({
url: getConfig().apiUrl,
token: async () => {
const runner = await queryClient.fetchQuery(
Expand All @@ -245,9 +244,8 @@ function useActorEngineContext({ actorId }: { actorId: ActorId }) {
);
},
engineToken,
})
: null;
}, [actor?.runner, provider.runnerByNameQueryOptions, engineToken]);
});
}, [actorId, actor?.runner, provider.runnerByNameQueryOptions, engineToken]);

return { actorContext, actor, runner, isLoading };
}
Expand All @@ -273,24 +271,6 @@ function ActorEngineProvider({
);
}

if (!actorContext) {
return (
<InspectorGuardContext.Provider
value={
<Info>
<p>Unable to connect to the Actor's Inspector.</p>
<p>
Your namespace is missing an engine token. Please
report this to Rivet support.
</p>
</Info>
}
>
{children}
</InspectorGuardContext.Provider>
);
}

return (
<ActorProvider value={actorContext}>
<InspectorGuard actorId={actorId}>{children}</InspectorGuard>
Expand Down
Loading