Skip to content

Commit

Permalink
[front]fix ts(#8274)
Browse files Browse the repository at this point in the history
  • Loading branch information
CelineSebe committed Sep 17, 2024
1 parent b797a33 commit ee8b7ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useMemo } from 'react';
import { useParams } from 'react-router-dom';
import { graphql, useSubscription } from 'react-relay';
import { RootExternalReferenceQuery$data } from '@components/analyses/external_references/__generated__/RootExternalReferenceQuery.graphql';
import { useFormatter } from '../../../../components/i18n';
import { QueryRenderer } from '../../../../relay/environment';
import ExternalReference from './ExternalReference';
Expand Down Expand Up @@ -46,7 +47,7 @@ const RootExternalReference = () => {
<QueryRenderer
query={externalReferenceQuery}
variables={{ id: externalReferenceId }}
render={({ props }) => {
render={({ props }: { props: RootExternalReferenceQuery$data }) => {
if (props) {
if (props.externalReference && props.connectorsForImport) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { graphql, useSubscription } from 'react-relay';
import Box from '@mui/material/Box';
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
import { RootNoteQuery$data } from '@components/analyses/notes/__generated__/RootNoteQuery.graphql';
import { useFormatter } from '../../../../components/i18n';
import Breadcrumbs from '../../../../components/Breadcrumbs';
import StixCoreRelationship from '../../common/stix_core_relationships/StixCoreRelationship';
Expand Down Expand Up @@ -79,7 +80,7 @@ const RootNote = () => {
<QueryRenderer
query={noteQuery}
variables={{ id: noteId }}
render={({ props }) => {
render={({ props }: { props: RootNoteQuery$data }) => {
if (props) {
if (props.note) {
const { note } = props;
Expand Down

0 comments on commit ee8b7ce

Please sign in to comment.