Skip to content

Commit

Permalink
Fix bug on select bot
Browse files Browse the repository at this point in the history
  • Loading branch information
sefirosweb committed Apr 1, 2024
1 parent b5a1bdc commit 33d1051
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/pages/ConfigureBot/ConfigurationContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export const ConfigurationContextProvider: React.FC = () => {
const bot = useGetSelectedBot()

const { data: botConfigFromServer, isLoading } = useQuery<Config>({
enabled: bot?.socketId !== undefined,
queryKey: ['botConfig'],
queryFn: () => axios.get<Config>(`/api/get_bot_config/${bot?.socketId}`).then((response) => response.data),
enabled: selectedSocketId !== undefined,
queryKey: ['botConfig', selectedSocketId],
queryFn: () => axios.get<Config>(`/api/get_bot_config/${selectedSocketId}`).then((response) => response.data),
})

useEffect(() => {
Expand Down

0 comments on commit 33d1051

Please sign in to comment.