File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -132,8 +132,13 @@ module FeatureCard = {
132132 ~firstParagraph : string = "" ,
133133 ~slug : string ,
134134 ) => {
135- let authorImg = <img className = "h-full w-full rounded-full" src = author .imgUrl />
136-
135+ let authorImg = switch author .imgUrl {
136+ | "" => React .null
137+ | imgUrl =>
138+ <div className = "inline-block w-4 h-4 mr-2" >
139+ <img className = "h-full w-full rounded-full" src = imgUrl />
140+ </div >
141+ }
137142 <section
138143 className = "flex sm:px-4 md:px-8 lg:px-0 flex-col justify-end lg:flex-row sm:items-center h-full" >
139144 <div
@@ -166,7 +171,7 @@ module FeatureCard = {
166171 <h2 className = "hl-1" > {React .string (title )} </h2 >
167172 <div className = "mb-6" >
168173 <div className = "flex items-center body-sm text-gray-40 mt-2 mb-5" >
169- < div className = "inline-block w-4 h-4 mr-2" > authorImg </ div >
174+ authorImg
170175 <div >
171176 <a
172177 className = "hover:text-gray-60"
Original file line number Diff line number Diff line change @@ -13,21 +13,21 @@ let authors = [
1313 username : "hongbo" ,
1414 fullname : "Hongbo Zhang" ,
1515 role : "Compiler & Build System" ,
16- imgUrl : "https://pbs.twimg.com/profile_images/1369548222314598400/E2y46vrB_400x400.jpg " ,
16+ imgUrl : "" ,
1717 social : X ("bobzhang1988" ),
1818 },
1919 {
2020 username : "chenglou" ,
2121 fullname : "Cheng Lou" ,
2222 role : "Syntax & Tools" ,
23- imgUrl : "https://pbs.twimg.com/profile_images/554199709909131265/Y5qUDaCB_400x400.jpeg " ,
23+ imgUrl : "" ,
2424 social : X ("_chenglou" ),
2525 },
2626 {
2727 username : "maxim" ,
2828 fullname : "Maxim Valcke" ,
2929 role : "Syntax Lead" ,
30- imgUrl : "https://pbs.twimg.com/profile_images/970271048812974080/Xrr8Ob6J_400x400.jpg " ,
30+ imgUrl : "" ,
3131 social : X ("_binary_search" ),
3232 },
3333 {
You can’t perform that action at this time.
0 commit comments