Skip to content

Commit

Permalink
🐛 Identified risk refactor (#1521)
Browse files Browse the repository at this point in the history
- Drives the table from assessment data as requested
Resolves https://issues.redhat.com/browse/MTA-1434?

---------

Signed-off-by: ibolton336 <[email protected]>
  • Loading branch information
ibolton336 authored Nov 8, 2023
1 parent 521be72 commit 84cc866
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 359 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext, useEffect, useMemo } from "react";
import React, { useEffect, useMemo } from "react";
import Measure from "react-measure";
import { useTranslation } from "react-i18next";

Expand All @@ -8,6 +8,7 @@ import {
ChartAxis,
ChartBar,
ChartGroup,
ChartThemeColor,
ChartVoronoiContainer,
} from "@patternfly/react-charts";

Expand All @@ -16,9 +17,9 @@ import { StateError } from "@app/components/StateError";
import { PROPOSED_ACTION_LIST } from "@app/Constants";
import { ApplicationAdoptionPlan } from "@app/api/models";
import { getApplicationAdoptionPlan } from "@app/api/rest";
import { ApplicationSelectionContext } from "../../application-selection-context";
import { NoApplicationSelectedEmptyState } from "../no-application-selected-empty-state";
import { useQuery } from "@tanstack/react-query";
import { useFetchApplications } from "@app/queries/applications";

interface IChartData {
applicationId: number;
Expand All @@ -30,11 +31,7 @@ interface IChartData {

export const AdoptionPlan: React.FC = () => {
const { t } = useTranslation();

// Context
const { selectedItems: applications } = useContext(
ApplicationSelectionContext
);
const { data: applications } = useFetchApplications();

const {
data: adoptionPlan,
Expand Down Expand Up @@ -107,7 +104,7 @@ export const AdoptionPlan: React.FC = () => {
}}
>
<Chart
// themeColor={ChartThemeColor.multiOrdered}
themeColor={ChartThemeColor.multiOrdered}
containerComponent={
<ChartVoronoiContainer
labels={({ datum }) =>
Expand Down

This file was deleted.

Loading

0 comments on commit 84cc866

Please sign in to comment.