-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
68 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
...ropean-projects/components/pages/general/projects-types/charts/projects-types-2/index.tsx
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
...ges/general/projects-types/charts/success-rate-for-amounts-by-type-of-financing/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { useQuery } from "@tanstack/react-query"; | ||
import { useSearchParams } from "react-router-dom"; | ||
|
||
import Template from "./template"; | ||
import { GetData } from "./query"; | ||
import options from "./options"; | ||
|
||
import ChartWrapper from "../../../../../chart-wrapper"; | ||
import { getDefaultParams } from "./utils"; | ||
|
||
export default function SuccessRateForAmountsByTypeOfFinancing() { | ||
const [searchParams] = useSearchParams(); | ||
const params = getDefaultParams(searchParams); | ||
|
||
const { data, isLoading } = useQuery({ | ||
queryKey: ["projectsTypes2", params], | ||
queryFn: () => GetData(params), | ||
}); | ||
|
||
if (isLoading || !data) return <Template />; | ||
return ( | ||
<ChartWrapper | ||
id="successRateForAmountsByTypeOfFinancing" | ||
options={options(data)} | ||
legend={ | ||
<ul className="legend"> | ||
<li | ||
style={{ | ||
display: "flex", | ||
alignItems: "center", | ||
marginBottom: "5px", | ||
}} | ||
> | ||
<div | ||
style={{ | ||
width: "20px", | ||
height: "20px", | ||
background: "#6DD897", | ||
marginRight: "10px", | ||
}} | ||
/> | ||
<span>Pays sélectionné</span> | ||
</li> | ||
<li | ||
style={{ | ||
display: "flex", | ||
alignItems: "center", | ||
marginBottom: "5px", | ||
}} | ||
> | ||
<div | ||
style={{ | ||
width: "20px", | ||
height: "20px", | ||
background: "#09622A", | ||
marginRight: "10px", | ||
}} | ||
/> | ||
<span>UE & Etats associés</span> | ||
</li> | ||
</ul> | ||
} | ||
/> | ||
); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters