Skip to content

Commit

Permalink
move ponies to react with babel b00tc4mp#68
Browse files Browse the repository at this point in the history
  • Loading branch information
NerinaHctz committed Jul 3, 2024
1 parent 67254b0 commit 8ef2196
Show file tree
Hide file tree
Showing 36 changed files with 808 additions and 1,211 deletions.
5 changes: 4 additions & 1 deletion staff/nerina-castillo/ponies/app/logic/getAllFavPosts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const getAllFavPosts = () => {
posts.forEach((post) => {
post.fav = user.favs.includes(post.id);
post.like = post.likes.includes(sessionStorage.username);
post.following = user.following.includes(post.author);
post.author = {
username: post.author,
following: user.following.includes(post.author)
}
});

return posts.reverse();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import data from "../data/index.mjs";

const getAllFollowingUsersPosts = () => {
const getAllFollowingUserPosts = () => {
const user = data.findUser(
(user) => user.username === sessionStorage.username
);
Expand All @@ -12,10 +12,13 @@ const getAllFollowingUsersPosts = () => {
posts.forEach((post) => {
post.fav = user.favs.includes(post.id);
post.like = post.likes.includes(sessionStorage.username);
post.following = user.following.includes(post.author);
post.author = {
username: post.author,
following: user.following.includes(post.author)
}
});

return posts.reverse();
};

export default getAllFollowingUsersPosts;
export default getAllFollowingUserPosts;
5 changes: 4 additions & 1 deletion staff/nerina-castillo/ponies/app/logic/getAllPosts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const getAllPosts = () => {
posts.forEach((post) => {
post.fav = user.favs.includes(post.id);
post.like = post.likes.includes(sessionStorage.username);
post.following = user.following.includes(post.author);
post.author = {
username: post.author,
following: user.following.includes(post.author)
}
});

return posts.reverse();
Expand Down
4 changes: 2 additions & 2 deletions staff/nerina-castillo/ponies/app/logic/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import deletePost from "./deletePost.mjs";
import toggleFavPost from "./toggleFavPost.mjs";
import getAllFavPosts from "./getAllFavPosts.mjs";
import toggleFollowUser from "./toggleFollowUser.mjs";
import getAllFollowingUsersPosts from "./getAllFollowingUsersPosts.mjs";
import getAllFollowingUserPosts from "./getAllFollowingUserPosts.mjs";

const logic = {
getAllPosts,
Expand All @@ -27,7 +27,7 @@ const logic = {
toggleFavPost,
getAllFavPosts,
toggleFollowUser,
getAllFollowingUsersPosts,
getAllFollowingUserPosts,
};

export default logic;
111 changes: 0 additions & 111 deletions staff/nerina-castillo/ponies/app/view/Component.mjs

This file was deleted.

14 changes: 0 additions & 14 deletions staff/nerina-castillo/ponies/app/view/components/Button.mjs

This file was deleted.

17 changes: 0 additions & 17 deletions staff/nerina-castillo/ponies/app/view/components/Form.mjs

This file was deleted.

9 changes: 0 additions & 9 deletions staff/nerina-castillo/ponies/app/view/components/Heading.mjs

This file was deleted.

15 changes: 0 additions & 15 deletions staff/nerina-castillo/ponies/app/view/components/Image.mjs

This file was deleted.

11 changes: 0 additions & 11 deletions staff/nerina-castillo/ponies/app/view/components/Input.mjs

This file was deleted.

11 changes: 0 additions & 11 deletions staff/nerina-castillo/ponies/app/view/components/Label.mjs

This file was deleted.

13 changes: 0 additions & 13 deletions staff/nerina-castillo/ponies/app/view/components/Link.mjs

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.Button{
.Button {
background: white;
color:black;
color: black;
border-radius: 5px;
border: none;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
padding: .25rem .5rem;

}

.Button--active{
.Button--active {
background-color: rgb(231, 230, 237);
}
}

This file was deleted.

Loading

0 comments on commit 8ef2196

Please sign in to comment.