@@ -4,6 +4,7 @@ import "./index.scss"
4
4
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
5
5
import { faSearch , faTimes , faFilter } from "@fortawesome/free-solid-svg-icons"
6
6
import { activityTypes , normalizeActivityType } from "../lib/normalize"
7
+ import LazyLoad from "react-lazyload"
7
8
8
9
import Layout from "../components/layout"
9
10
import Fluid200 from "../components/Fluid200"
@@ -194,33 +195,35 @@ const IndexPage = () => {
194
195
< ul className = "org-list" >
195
196
{ filteredOrgs . map ( ( { node : org } ) => (
196
197
< li className = "org-list__item" key = { org . primaryKey } >
197
- < Link to = { `/org/${ org . primaryKey } ` } >
198
- < figure className = "org-list__item__poster" >
199
- < Fluid200 url = { org . posterImageUrls [ 0 ] } alt = "" />
200
- < figcaption >
201
- < h2 className = "org-list__item__name" > { org . name } </ h2 >
202
- < p className = "org-list__item__activity-introduce" >
203
- { org . activityIntroduce . slice ( 0 , 100 ) + "..." }
204
- </ p >
205
- </ figcaption >
206
- </ figure >
207
- </ Link >
208
-
209
- < div // スマホ用
210
- className = "org-list__item__sp-caption"
211
- onClick = { ( ) => {
212
- if ( lastTouchedItem === org . primaryKey )
213
- navigate ( `/org/${ org . primaryKey } ` )
214
- setLastTouchedItem ( org . primaryKey )
215
- } }
216
- >
217
- < div className = "org-list__item__sp-caption__name" >
218
- { org . name }
219
- </ div >
220
- < div className = "org-list__item__sp-caption__activity-introduce" >
221
- { org . activityIntroduce . slice ( 0 , 100 ) + "..." }
198
+ < LazyLoad offset = { 200 } once >
199
+ < Link to = { `/org/${ org . primaryKey } ` } >
200
+ < figure className = "org-list__item__poster" >
201
+ < Fluid200 url = { org . posterImageUrls [ 0 ] } alt = "" />
202
+ < figcaption >
203
+ < h2 className = "org-list__item__name" > { org . name } </ h2 >
204
+ < p className = "org-list__item__activity-introduce" >
205
+ { org . activityIntroduce . slice ( 0 , 100 ) + "..." }
206
+ </ p >
207
+ </ figcaption >
208
+ </ figure >
209
+ </ Link >
210
+
211
+ < div // スマホ用
212
+ className = "org-list__item__sp-caption"
213
+ onClick = { ( ) => {
214
+ if ( lastTouchedItem === org . primaryKey )
215
+ navigate ( `/org/${ org . primaryKey } ` )
216
+ setLastTouchedItem ( org . primaryKey )
217
+ } }
218
+ >
219
+ < div className = "org-list__item__sp-caption__name" >
220
+ { org . name }
221
+ </ div >
222
+ < div className = "org-list__item__sp-caption__activity-introduce" >
223
+ { org . activityIntroduce . slice ( 0 , 100 ) + "..." }
224
+ </ div >
222
225
</ div >
223
- </ div >
226
+ </ LazyLoad >
224
227
</ li >
225
228
) ) }
226
229
</ ul >
0 commit comments