1- import  {  array ,  string  }  from  "prop-types" ; 
2- import  {  GatsbyImage  }  from  "gatsby-plugin-image" ; 
31import  React  from  "react" ; 
2+ import  {  GatsbyImage  }  from  "gatsby-plugin-image" ; 
43import  styled  from  "styled-components" ; 
54
65import  {  Tile  }  from  "ui/components" ; 
@@ -43,8 +42,15 @@ const ItemText = styled.div`
4342  } 
4443` ; 
4544
46- function  Clients ( props )  { 
45+ interface  ClientsProps  { 
46+   clients : Queries . HomeTplQuery [ "clients" ] [ "edges" ] ; 
47+   subtitle : string ; 
48+   title : string ; 
49+ } 
50+ 
51+ function  Clients ( props : ClientsProps )  { 
4752  const  {  clients,  title,  subtitle }  =  props ; 
53+ 
4854  return  ( 
4955    < Element  as = "section" > 
5056      < div  className = "el" > 
@@ -59,9 +65,14 @@ function Clients(props) {
5965              < Item  key = { node . id } > 
6066                < Tile  href = { client . link }  target = "_blank"  as = "a" > 
6167                  < ItemTitle > 
62-                     < GatsbyImage  image = { client . logo . childImageSharp . gatsbyImageData }  alt = { client . name }  /> 
68+                     < GatsbyImage 
69+                       image = { client . logo . childImageSharp . gatsbyImageData } 
70+                       alt = { client ?. name  ??  "" } 
71+                     /> 
6372                  </ ItemTitle > 
64-                   < ItemText  dangerouslySetInnerHTML = { {  __html : node . html  } }  /> 
73+                   < ItemText 
74+                     dangerouslySetInnerHTML = { {  __html : node . html  ??  ""  } } 
75+                   /> 
6576                </ Tile > 
6677              </ Item > 
6778            ) ; 
@@ -72,10 +83,4 @@ function Clients(props) {
7283  ) ; 
7384} 
7485
75- Clients . propTypes  =  { 
76-   clients : array . isRequired , 
77-   subtitle : string . isRequired , 
78-   title : string . isRequired 
79- } ; 
80- 
8186export  default  Clients ; 
0 commit comments