Skip to content

Commit aa513b6

Browse files
committed
add query to get chartimage details
1 parent bb8273b commit aa513b6

File tree

1 file changed

+22
-1
lines changed
  • app/[locale]/dashboard/[entityType]/[entitySlug]/dataset/[id]/edit/charts/components

1 file changed

+22
-1
lines changed

app/[locale]/dashboard/[entityType]/[entitySlug]/dataset/[id]/edit/charts/components/ChartsImage.tsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useState } from 'react';
2+
import { graphql } from '@/gql';
23
import {
34
Button,
45
Divider,
@@ -13,9 +14,29 @@ import { Icons } from '@/components/icons';
1314

1415
interface ImageProps {
1516
setType: any;
17+
setImageId: any;
18+
imageId: any;
1619
}
1720

18-
const ChartsImage: React.FC<ImageProps> = ({ setType }) => {
21+
const getResourceChartImageDetails: any = graphql(`
22+
query resourceChartImage($filters: ResourceChartImageFilter) {
23+
resourceChartImages(filters: $filters) {
24+
id
25+
name
26+
description
27+
image {
28+
name
29+
path
30+
}
31+
}
32+
}
33+
`);
34+
35+
const ChartsImage: React.FC<ImageProps> = ({
36+
setType,
37+
setImageId,
38+
imageId,
39+
}) => {
1940
console.log(setType);
2041
const [isSheetOpen, setIsSheetOpen] = useState(false);
2142

0 commit comments

Comments
 (0)