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

product comment #451

Open
wants to merge 4 commits into
base: master
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
32 changes: 32 additions & 0 deletions src/components/ProductPage/Comments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import './Comments.scss';

export default function Comments({ comments = [] }) {
return <div id="productComments">
<h3>Comments</h3>
<ul className="comment-list">
{comments.map((comment) => (
<li key={comment.commentId}>
<div className='user-name'>{comment.userName}</div>
<p className='comment'>{comment.comment}</p>
</li>
))}
</ul>
</div>;
}

export const layout = {
areaId: 'productPageMiddleLeft',
sortOrder: 45
}

export const query = `
query {
comments(productId: getContextValue("productId")) {
commentId
userName
comment
createdAt
}
}
`;
18 changes: 18 additions & 0 deletions src/components/ProductPage/Comments.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

.comment-list {
margin-bottom: 20px;
li {
padding: 10px 0;
border-bottom: 1px solid #eee;
:last-child {
border-bottom: 0;
}
}
.user-name {
font-weight: bold;
margin-bottom: 5px;
}
.comment{
font-style: italic;
}
}
11 changes: 11 additions & 0 deletions src/pages/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Not Found
hero: This does not exist
permalink: /404.html
sitemap: false
---

## 404
Sorry, but the page you were trying to view is gone amiss---perhaps you can try a site search to find it.

{% include site-search.html %}
9 changes: 9 additions & 0 deletions src/pages/privacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Privacy
permalink: /privacy/
hero: Privacy
---

This website does not collect or store any data and does not use cookies or tracking/analytics services.

This site uses the Gumroad e-commerce platform. Please refer to [privacy policy] for further information.