Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions src/main/webapp/app/entities/post copy/post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,6 @@ export const Post = () => {

return (
<div>
{/* Heading */}
<h1 id="post-heading" data-cy="PostHeading">
<div id="header-jawn">
{/* Butterflies surrounding feed */}
<img id="butterfly" height="50" width="50" src="content/images/image.png" alt="Logo" />
&nbsp;Flutter Feed&nbsp;
<img id="butterfly" height="50" width="50" src="content/images/Butterfree-Pokemon-PNG-Transparent.png" alt="Logo" />
</div>
</h1>
<div className="d-flex justify-content-center">
{/* Create New Post Button */}
<div className="container">
<div className="post-list-row">
<div className="new-post-jawn">
<PostUpdate onNewPost={handleNewPost} />
{/* <Link to="/post/new" className="btn btn-primary jh-create-entity" id="jh-create-entity" data-cy="entityCreateButton">
<FontAwesomeIcon icon="plus" />
&nbsp;New Post
</Link> */}
</div>
</div>
</div>
</div>

{
<div className="app-container">
{postList && postList.length > 0 ? (
Expand Down Expand Up @@ -202,21 +178,6 @@ export const Post = () => {
<div className="post-list-cell post-content" id="post-content">
<div className="comment-value">{comment.text}</div>
</div>

{/* {post.user &&
post.user.login === currentUser.login && ( // Check if post belongs to the current user
<Button
tag={Link}
to={`/post/${post.id}/edit`}
color="primary"
size="sm"
data-cy="entityEditButton"
id="edit-button"
>
<FontAwesomeIcon icon="pencil-alt" /> <span className="d-none d-md-inline">Edit</span>
</Button>
)} */}

<div className="comment-field">
<div className="comment-label"></div>
<div className="comment-value text-end">
Expand Down
19 changes: 0 additions & 19 deletions src/main/webapp/app/entities/post/post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ export const Post = () => {
<div className="post-list-row">
<div className="new-post-jawn">
<PostUpdate onNewPost={handleNewPost} />
{/* <Link to="/post/new" className="btn btn-primary jh-create-entity" id="jh-create-entity" data-cy="entityCreateButton">
<FontAwesomeIcon icon="plus" />
&nbsp;New Post
</Link> */}
</div>
</div>
</div>
Expand Down Expand Up @@ -202,21 +198,6 @@ export const Post = () => {
<div className="post-list-cell post-content" id="post-content">
<div className="comment-value">{comment.text}</div>
</div>

{/* {post.user &&
post.user.login === currentUser.login && ( // Check if post belongs to the current user
<Button
tag={Link}
to={`/post/${post.id}/edit`}
color="primary"
size="sm"
data-cy="entityEditButton"
id="edit-button"
>
<FontAwesomeIcon icon="pencil-alt" /> <span className="d-none d-md-inline">Edit</span>
</Button>
)} */}

<div className="comment-field">
<div className="comment-label"></div>
<div className="comment-value text-end">
Expand Down
2 changes: 0 additions & 2 deletions src/main/webapp/app/entities/profile/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const Post = () => {

const postList = useAppSelector(state => state.post.entities);
const loading = useAppSelector(state => state.post.loading);
const isAuthenticated = useAppSelector(state => state.authentication.isAuthenticated);
const currentUser = useAppSelector(state => state.authentication.account);
const postEntity = useAppSelector(state => state.post.entity);

Expand Down Expand Up @@ -87,7 +86,6 @@ export const Post = () => {
<div className="post-list ">
<FlipMove duration={500}>
{/* Displays each Post */}
{/* {[...postList].map((post, i) => ( */}
{[...postList].reverse().map((post, i) => {
const reverseIndex = postList.length - 1 - i;
return (
Expand Down