Skip to content

Commit

Permalink
fix: querryKeys renamed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mheggelund committed Jan 3, 2024
1 parent 3abcfb9 commit 041790d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/AreaCoordinates/AreaCoordinates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const AreaCoordinates = ({ modelId }: { modelId: string }) => {
}

const model = useQuery({
queryKey: ['analogue-models', modelId, updated],
queryKey: ['analogue-model', modelId, updated],
queryFn: () => AnalogueModelsService.getApiAnalogueModels1(modelId),
});

Expand Down
3 changes: 2 additions & 1 deletion src/features/Compute/CaseGroup/CaseRow/CaseRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const CaseRow = ({
const [saved, setSaved] = useState<boolean>(true);

const { data } = useQuery({
queryKey: ['analogue-models', modelId],
queryKey: ['analogue-model', modelId],
queryFn: () =>
AnalogueModelsService.getApiAnalogueModels1(modelId as string),
enabled: !!token,
Expand Down Expand Up @@ -304,6 +304,7 @@ export const CaseRow = ({
<CaseButtons
caseType={saveObjectCase ? 'Object' : 'Variogram'}
disableRun={saved}
isProcessed={data?.data.isProcessed}
saveCase={() => saveCase(id)}
runCase={runRowCase}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const ModelMetadataView = () => {
const [isAddModelDialog, setAddModelDialog] = useState<boolean>(false);
const [refetchKey, setRefetchKey] = useState<number>(0);
const { isLoading, data } = useQuery({
queryKey: ['analogue-models', modelId, refetchKey],
queryKey: ['analogue-model', modelId, refetchKey],
queryFn: () =>
AnalogueModelsService.getApiAnalogueModels1(modelId as string),
enabled: !!token,
Expand Down
2 changes: 1 addition & 1 deletion src/features/ModelView/ModelSourceView/ModelSourceView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const ModelSourceView = () => {
if (token) OpenAPI.TOKEN = token;

const { isLoading, data } = useQuery({
queryKey: ['analogue-models', modelId],
queryKey: ['analogue-model', modelId],
queryFn: () =>
AnalogueModelsService.getApiAnalogueModels1(modelId as string),
enabled: !!token,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ModelPages/Model/Model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const Model = () => {
if (token) OpenAPI.TOKEN = token;

const { data, isLoading } = useQuery({
queryKey: ['analogue-models', modelId],
queryKey: ['analogue-model', modelId],
queryFn: () =>
AnalogueModelsService.getApiAnalogueModels1(modelId as string),
enabled: !!token,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ModelPages/Results/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const Results = () => {
});

const cases = useQuery({
queryKey: ['analogue-models', modelId],
queryKey: ['model-cases', modelId],
queryFn: () =>
AnalogueModelComputeCasesService.getApiAnalogueModelsComputeCases(
modelId as string,
Expand Down

0 comments on commit 041790d

Please sign in to comment.