@@ -26,7 +26,7 @@ async function getEvents() {
26
26
27
27
export default async function Home ( ) {
28
28
const events = await getEvents ( ) ;
29
- console . log ( events )
29
+ // console.log(events)
30
30
31
31
return (
32
32
@@ -105,7 +105,7 @@ export default async function Home() {
105
105
106
106
107
107
{ /* Instagram Feed */ }
108
- { /* <div className="mb-4 mx-12 sm:mx-24">
108
+ < div className = "mb-4 mx-12 sm:mx-24" >
109
109
< div className = { fabulous . className } >
110
110
< h1 className = "text-center text-white text-3xl mt-4 mb-4" > Instagram Feed</ h1 >
111
111
</ div >
@@ -117,7 +117,7 @@ export default async function Home() {
117
117
< a href = "https://www.instagram.com/mesh.uw/?hl=en" > View Full Feed</ a >
118
118
</ button >
119
119
</ div >
120
- </div> */ }
120
+ </ div >
121
121
122
122
< div className = "mb-4 mx-24" >
123
123
< div className = { fabulous . className } >
@@ -167,49 +167,49 @@ async function InstagramFeed() {
167
167
try {
168
168
const url = `https://graph.instagram.com/me/media?fields=id,caption,media_url,media_type,timestamp,permalink&access_token=${ process . env . IG_TOKEN } ` ;
169
169
const data = await fetch ( url ) ;
170
- console . log ( "data" , data ) ;
170
+ // console.log("data", data);
171
171
if ( ! data . ok ) {
172
172
throw new Error ( "Failed to fetch Instagram feed" ) ;
173
173
}
174
174
instagramFeed = await data . json ( ) ;
175
- console . log ( "Instagram feed:" , instagramFeed ) ;
175
+ // console.log("Instagram feed:", instagramFeed);
176
176
} catch ( err ) {
177
177
console . error ( "Error fetching Instagram feed:" , err . message ) ;
178
178
error = err . message ;
179
179
}
180
180
181
- // const feed = (instagramFeed.data.map(post => (
182
- // <div key={post.id} className="flex justify-center items-center w-full h-auto overflow-hidden">
183
- // <div className="aspect-square overflow-hidden border border-solid border-white">
184
- // <Link
185
- // href={post.permalink}
186
- // target="_blank"
187
- // rel="noopener noreferrer"
188
- // className="aspect-content border"
189
- // >
190
- // {post.media_type === "VIDEO" ? (
191
- // <video
192
- // src={post.media_url}
193
- // controls={false}
194
- // className="object-cover "
195
- // />
196
- // ) : (
197
- // <Image
198
- // src={post.media_url}
199
- // alt={post.caption}
200
- // className="object-cover"
201
- // layout="fill"
202
- // />
203
- // )}
204
- // </Link>
205
- // </div>
181
+ const feed = ( instagramFeed . data . map ( post => (
182
+ < div key = { post . id } className = "flex justify-center items-center w-full h-auto overflow-hidden" >
183
+ < div className = "aspect-square overflow-hidden border border-solid border-white" >
184
+ < Link
185
+ href = { post . permalink }
186
+ target = "_blank"
187
+ rel = "noopener noreferrer"
188
+ className = "aspect-content border"
189
+ >
190
+ { post . media_type === "VIDEO" ? (
191
+ < video
192
+ src = { post . media_url }
193
+ controls = { false }
194
+ className = "object-cover"
195
+ />
196
+ ) : (
197
+ < Image
198
+ src = { post . media_url }
199
+ alt = { post . caption }
200
+ className = "object-cover"
201
+ layout = "fill"
202
+ />
203
+ ) }
204
+ </ Link >
205
+ </ div >
206
206
207
- // </div>
208
- // ))).slice(0, 6)
207
+ </ div >
208
+ ) ) ) . slice ( 0 , 6 )
209
209
210
210
return (
211
211
< >
212
- { /* { feed} */ }
212
+ { feed }
213
213
</ >
214
214
215
215
) ;
0 commit comments