Skip to content

Commit

Permalink
Merge pull request #21 from miku0129/firebase-develop
Browse files Browse the repository at this point in the history
Firebase develop
  • Loading branch information
miku0129 authored Mar 17, 2024
2 parents 987a3b9 + 3d6f303 commit 587a69f
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Fixes #
## Fixes

## Changes

Expand Down
6 changes: 5 additions & 1 deletion src/component/article-card/article-card.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import "./article-card.component.scss";
const ArticleCard = ({ article }) => {
const { created_time, message, permalink_url, full_picture } = article;

const text = message.length < 60 ? message : message.slice(0, 60) + "...";
const text =
String(message.slice(0, 6)) === "https:"
? message.slice(0, 30) + "..."
: message.slice(0, 60) + "...";
console.log(message.slice(0, 20));

const src = full_picture
? full_picture
Expand Down
2 changes: 1 addition & 1 deletion src/component/content-header/content-header.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Header = styled.div`
rgb(235, 130, 23, 0.8),
rgb(220, 241, 231, 0)
),
url("https://i.ibb.co/P5YY5z7/IMG-9034.jpg");
url("https://i.ibb.co/G2cH2Xh/jm11.jpg");
width: 100%;
height: 100vh;
background-size: cover;
Expand Down
4 changes: 2 additions & 2 deletions src/component/nav/nav.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Navigation = styled.div`
.menu {
list-style: none;
display: flex;
gap: 20px;
gap: 10px;
li {
a {
Expand Down Expand Up @@ -74,7 +74,7 @@ export const Navigation = styled.div`
.menu {
padding-left: 0;
justify-content: space-around;
gap: 30px;
li {
text-align: center;
Expand Down
14 changes: 7 additions & 7 deletions src/route/articles-preview/articles-preview.component.jsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { useEffect, useState } from "react";

import ArticleCard from "../../component/article-card/article-card.component";
import EventCard from "../../component/event-card/event-card.component";
// import EventCard from "../../component/event-card/event-card.component";

import {
getPostsFromFacebook,
getEventsFromPosts,
// getEventsFromPosts,
} from "../../utils/facebook.utils";

import "./articles-preview.styles.scss";

const ArticlesPreview = () => {
const [facebookPosts, setFacebookPosts] = useState("");
const [facebookEvents, setFacebookEvents] = useState("");
// const [facebookEvents, setFacebookEvents] = useState("");

useEffect(() => {
getPostsFromFacebook().then((res) => setFacebookPosts(res));
getEventsFromPosts().then((res) => setFacebookEvents(res));
// getEventsFromPosts().then((res) => setFacebookEvents(res));
}, []);

console.log("facebookEvents", facebookEvents);
// console.log("facebookEvents", facebookEvents);

return (
<div className="articles-preview-container">
Expand All @@ -32,14 +32,14 @@ const ArticlesPreview = () => {
return <ArticleCard article={article} key={article.id} />;
})}
</div>
<div className="articles-preview-sub-container">
{/* <div className="articles-preview-sub-container">
{facebookEvents &&
facebookEvents
.filter((_, idx) => idx < 3)
.map((article) => {
return <EventCard article={article} key={article.id} />;
})}
</div>
</div> */}
</div>
);
};
Expand Down
2 changes: 0 additions & 2 deletions src/route/articles-preview/articles-preview.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
gap: 50px;
}
@media (max-width: 450px) {
flex-direction: row;
justify-content: center;
padding: 0 20px 20px 20px;
.articles-preview-sub-container {
flex-direction: column;
Expand Down
33 changes: 27 additions & 6 deletions src/utils/data.utils/activity-photo-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,49 @@ export const ACTIVITY_PHOTO_IMAGES = {
activity_photo: [
{
id: 0,
image_url: "https://i.ibb.co/TkSKX8R/363436690-674200007560785-4359258381712670777-n.jpg",
image_url: "https://i.ibb.co/d6ym9jT/jm01.jpg",
},
{
id: 1,
image_url: "https://i.ibb.co/fn33tzP/IMG-9041.jpg",
image_url: "https://i.ibb.co/dbqT8RJ/jm02.jpg",
},
{
id: 2,
image_url: "https://i.ibb.co/P5YY5z7/IMG-9034.jpg",
image_url: "https://i.ibb.co/86wdSpJ/jm04.jpg",
},
{
id: 3,
image_url: "https://i.ibb.co/bmgpK9p/IMG-9048.jpg",
image_url: "https://i.ibb.co/TtbbL43/jm30.jpg",
},
{
id: 4,
image_url: "https://i.ibb.co/yycnfps/IMG-9052.jpg",
image_url: "https://i.ibb.co/MfTFjW1/jm05.jpg",
},
{
id: 5,
image_url: "https://i.ibb.co/6RvJbbR/IMG-9043.jpg",
image_url: "https://i.ibb.co/z7FKSHt/jm07.jpg",
},
{
id: 6,
image_url: "https://i.ibb.co/JtgpW0g/jm14.jpg",
},
{
id: 7,
image_url: "https://i.ibb.co/jDz2JCZ/jm13.jpg",
},
{
id: 8,
image_url: "https://i.ibb.co/4JnpP37/jm17.jpg",
},
{
id: 9,
image_url: "https://i.ibb.co/BzBFYwm/jm12.jpg",
},
{
id: 10,
image_url: "https://i.ibb.co/ZGc9Hd4/jm27.jpg",
},


],
};

0 comments on commit 587a69f

Please sign in to comment.