Skip to content

Commit

Permalink
Revert "Switch to use utils"
Browse files Browse the repository at this point in the history
This reverts commit 17997c8.
  • Loading branch information
Gabau committed Nov 13, 2023
1 parent 17997c8 commit 6da7387
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useAIComm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function useAIComm(
isAIResponding: false,
});

const utils = api.useUtils();
const utils = api.useContext();

const allSessionMessages =
api.userAndAIMessages.getAllSessionUserAndAIMessages.useQuery({
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useSessionComm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function useSessionComm(
partnerIsTyping: false,
});

const utils = api.useUtils();
const utils = api.useContext();

const allSessionMessages =
api.userAndUserMessages.getAllSessionUserAndUserMessages.useQuery({
Expand Down
2 changes: 1 addition & 1 deletion src/pages/maintainer/environments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const CreateEnvironment = () => {
}));
};

const apiContext = api.useUtils();
const apiContext = api.useContext();

const updateEnvMutation = api.environment.upsertEnvironment.useMutation(
{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/questions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Questions() {

const [page, setPage] = useState(0);

const getAllQuery = api.useUtils().question.getAllReducedInfinite;
const getAllQuery = api.useContext().question.getAllReducedInfinite;

const {
data,
Expand Down

0 comments on commit 6da7387

Please sign in to comment.