diff --git a/components/Feed.js b/components/Feed.js new file mode 100644 index 0000000..4889712 --- /dev/null +++ b/components/Feed.js @@ -0,0 +1,32 @@ +const Feed = ({ + media, + type, + setOverlayContent, + currentIndex, + limitPerPage, +}) => ( +
+ {media + .slice(currentIndex, limitPerPage) + .map(({ id, url, previewPath, embedPath = url }) => ( + { + e.preventDefault(); + + setOverlayContent({ + url: embedPath, + type, + }); + }} + > + {url} + + ))} +
+); + +export default Feed; diff --git a/components/Footer.js b/components/Footer.js new file mode 100644 index 0000000..742f4af --- /dev/null +++ b/components/Footer.js @@ -0,0 +1,49 @@ +import Link from "next/link"; + +import { YEAR_TO_BUMP } from "../constants"; + +const Footer = ({ license, links, repo, commitID }) => ( + +); + +export default Footer; diff --git a/components/Navbar.js b/components/Navbar.js new file mode 100644 index 0000000..b93dd17 --- /dev/null +++ b/components/Navbar.js @@ -0,0 +1,21 @@ +import Link from "next/link"; + +const Navbar = ({ name, logo }) => ( + +); + +export default Navbar; diff --git a/components/Overlay.js b/components/Overlay.js new file mode 100644 index 0000000..4b0d41d --- /dev/null +++ b/components/Overlay.js @@ -0,0 +1,57 @@ +import { MEDIA_TYPE } from "../constants"; + +const OverlayContent = ({ overlayContent }) => { + if (overlayContent?.type === MEDIA_TYPE.PHOTOS) { + return ( + {overlayContent?.url} + ); + } else if (overlayContent?.type === MEDIA_TYPE.VIDEOS) { + return ( + + ); + } +}; + +const Overlay = ({ overlayContent, closeOverlay }) => { + const isOverlayOpen = overlayContent?.type !== undefined; + + return ( +
+ {isOverlayOpen ? ( +

+ Click anywhere or press "Escape" to close +

+ ) : null} + +
+ +
+
+ ); +}; + +export default Overlay; diff --git a/components/Profile.js b/components/Profile.js new file mode 100644 index 0000000..83702f9 --- /dev/null +++ b/components/Profile.js @@ -0,0 +1,46 @@ +const Profile = ({ profile, totalPosts }) => ( +
+
+ {profile.display_name} +
+
+
+

{profile.username}

+
+ + Follow + + + Message + +
+
+
+

{totalPosts} posts

+
+

{profile.display_name}

+

{profile.about}

+

+ + {profile.link} + +

+
+
+); + +export default Profile; diff --git a/components/Tab.js b/components/Tab.js new file mode 100644 index 0000000..28f50de --- /dev/null +++ b/components/Tab.js @@ -0,0 +1,27 @@ +const isActiveTab = (currentTab, activeTab) => + currentTab === activeTab ? "border-t" : ""; + +const Tab = ({ activeTab, setActiveTab }) => ( +
+ + +
+); + +export default Tab;