Skip to content

Commit

Permalink
adding medias
Browse files Browse the repository at this point in the history
  • Loading branch information
1peiwei committed Nov 26, 2024
1 parent aec57b9 commit c10b943
Showing 1 changed file with 56 additions and 31 deletions.
87 changes: 56 additions & 31 deletions src/app/media/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,48 @@ import Breadcrumb from "@/components/Common/Breadcrumb";

import { useState } from "react";
import { InstagramEmbed } from "react-social-media-embed";
import { YouTubeEmbed } from "react-social-media-embed";


const ContactPage = () => {

let p = [
"https://www.instagram.com/p/CzRU35kO7_5/",
"https://www.instagram.com/p/Czhn9aLsp78/",
"https://www.instagram.com/p/C0pVx7zOAFL/",
"https://www.instagram.com/p/C2RDT5XMk0e/",
"https://www.instagram.com/p/C2REDtqsn2D/",
"https://www.instagram.com/p/C2qbYnjM6sv/",
"https://www.instagram.com/reel/C3BYP4VulLL/",
"https://www.instagram.com/p/C3CIGuau9Ye/",
"https://www.instagram.com/p/C4Gppk6u0-o/",
"https://www.instagram.com/p/C46-stpOn1t/",
"https://www.instagram.com/p/C5FSeGgrqOV/",
"https://www.instagram.com/reel/C5J8XyoOuLN/",
"https://www.instagram.com/p/C5KXJ5qrqjN/",
"https://www.instagram.com/p/C517mUHrIgS/",
"https://www.instagram.com/p/C58gUrxrbay/",
"https://www.instagram.com/p/C6OrADrrsp4/",
"https://www.instagram.com/p/C7KZvQ9OBEo/",
"https://www.instagram.com/p/C871lHBPLtc/",
"https://www.instagram.com/p/C9G4PoHgGNP/",
"https://www.instagram.com/p/DAL2q0dOYWZ/",
"https://www.instagram.com/p/DAgw8RQSP2h/",
"https://www.instagram.com/p/DBwozPNSktg/",
"https://www.instagram.com/p/DB41ueRxIm4/",
"https://www.instagram.com/p/DAj8ryqu6e0/"
{type: "instagram", url: "https://www.instagram.com/p/CzRU35kO7_5/"},
{type: "instagram", url: "https://www.instagram.com/p/Czhn9aLsp78/"},
{type: "instagram", url: "https://www.instagram.com/p/C0pVx7zOAFL/"},
{type: "youtube", url: "https://youtu.be/77LNDrU7I0w?si=upTANsVLW8DTrngf"},
{type: "youtube", url: "https://youtu.be/wEBE9C3Y9bo?si=2hFgnhgpqBE1jGpl"},
{type: "instagram", url: "https://www.instagram.com/p/C2RDT5XMk0e/"},
{type: "instagram", url: "https://www.instagram.com/p/C2REDtqsn2D/"},
{type: "instagram", url: "https://www.instagram.com/p/C2qbYnjM6sv/"},
{type: "instagram", url: "https://www.instagram.com/reel/C3BYP4VulLL/"},
{type: "instagram", url: "https://www.instagram.com/p/C3CIGuau9Ye/"},
{type: "youtube", url: "https://youtu.be/R2PmAsVfoOc?si=5z51e-Kn6Ak_rYf6"},
{type: "instagram", url: "https://www.instagram.com/p/C4Gppk6u0-o/"},
{type: "youtube", url: "https://youtube.com/shorts/7tUxkZLAY2M?si=SpFC0e3ROvMh1y7t"},
{type: "youtube", url: "https://youtube.com/shorts/mkdUE6tY9xI?si=IM-KvlignnZ3IHc9"},
{type: "youtube", url:"https://youtube.com/shorts/hp08BIl_H_0?si=kwA0zjOJW6EmXTI-"},
{type: "instagram", url: "https://www.instagram.com/p/C46-stpOn1t/"},
{type: "instagram", url: "https://www.instagram.com/p/C5FSeGgrqOV/"},
{type: "youtube", url: "https://youtu.be/rgMk_qIcpiM?si=N8XpWnUWu0YH0qFt"},
{type: "instagram", url: "https://www.instagram.com/reel/C5J8XyoOuLN/"},
{type: "instagram", url: "https://www.instagram.com/p/C5KXJ5qrqjN/"},
{type: "youtube", url: "https://youtu.be/Qn3xoH4k7p8?si=v3U5AGVl7B2SPGge"},
{type: "instagram", url: "https://www.instagram.com/p/C517mUHrIgS/"},
{type: "instagram", url: "https://www.instagram.com/p/C58gUrxrbay/"},
{type: "instagram", url: "https://www.instagram.com/p/C6OrADrrsp4/"},
{type: "youtube", url: "https://youtu.be/lP0ZFmX9jYk?si=VHmevD-sgrpkWlg_"},
{type: "instagram", url: "https://www.instagram.com/p/C7KZvQ9OBEo/"},
{type: "instagram", url: "https://www.instagram.com/p/C871lHBPLtc/"},
{type: "instagram", url: "https://www.instagram.com/p/C9G4PoHgGNP/"},
{type: "instagram", url: "https://www.instagram.com/p/DAL2q0dOYWZ/"},
{type: "instagram", url: "https://www.instagram.com/p/DAgw8RQSP2h/"},
{type: "instagram", url: "https://www.instagram.com/p/DAj8ryqu6e0/"},
{type: "instagram", url: "https://www.instagram.com/p/DBwozPNSktg/"},
{type: "instagram", url: "https://www.instagram.com/p/DB41ueRxIm4/"},
{type: "instagram", url: "https://www.instagram.com/p/DCpzm9SRlKj/"},
{type: "instagram", url: "https://www.instagram.com/p/DCxB3Vxy9cn/"},
{type: "youtube", url: "https://youtu.be/R9iVv4WKt9c?si=_OPmi7fMM8FGFj0i"}
]

const [render, setRender] = useState(p.slice(p.length - 3, p.length))
Expand All @@ -46,13 +59,25 @@ const ContactPage = () => {
<div className="media mt-10">
<div className="media-containter flex justify-center overflow-hidden">
<div className="media flex-col justify-center space-y-5 sm:w-[650px]">
{render.map((link) => (
<InstagramEmbed
captioned
url={link}
key={link}
/>
)).reverse()}
{render.map((link) => {
if (link.type === "instagram"){
return(
<InstagramEmbed
captioned
url={link.url}
key={link.url}
/>
);
}
else if(link.type === "youtube"){
return(
<YouTubeEmbed
url={link.url}
key={link.url}
/>
);
}
}).reverse()}
</div>
</div>
<div className="loadmore flex justify-center pt-4 pb-12">
Expand Down

0 comments on commit c10b943

Please sign in to comment.