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

Minor changes made #38

Open
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion components/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Footer = () => {
<li><a href="#">Gift Cards</a></li>
<li><a href="#">Find a store</a></li>
<li><a href="#">Newsletter</a></li>
<li><a href="#">Bacome a member</a></li>
<li><a href="#">Become a member</a></li>
<li><a href="#">Site feedback</a></li>
</ul>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion components/page-intro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const PageIntro = () => {
<i className="icon-shipping"></i>
<div className="data-item__content">
<h4>Free Shipping</h4>
<p>On purchases over $199</p>
<p>Purchases over $199 will be shipped free of charge</p>
</div>
</li>

Expand Down
4 changes: 2 additions & 2 deletions components/product-single/reviews/punctuation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Punctuation = ({ votes, punctuation, countOpinions }: PunctuationType) =>
<div className="product-punctuation__values">
<h3>{punctuation}</h3>
<Rater total={5} interactive={false} rating={punctuation} />
<p><i className="icon-avatar"></i>{countOpinions} all opinions</p>
<p><i className="icon-avatar"></i>{countOpinions} reviews</p>
</div>

<div className="product-punctuation__rates">
Expand All @@ -29,7 +29,7 @@ const Punctuation = ({ votes, punctuation, countOpinions }: PunctuationType) =>
</div>

<div className="punctuation-btn-wrapper">
<button type="button" className="btn btn--rounded btn--yellow">Add opinion</button>
<button type="button" className="btn btn--rounded btn--yellow">Add review</button>
</div>
</section>
);
Expand Down
2 changes: 1 addition & 1 deletion components/products-filter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ProductsFilter = () => {
<div className="products-filter__block">
<button type="button">Price</button>
<div className="products-filter__block__content">
<Range min={0} max={20} defaultValue={[3, 10]} tipFormatter={value => `${value}%`} />
<Range min={0} max={200} defaultValue={[0, 200]} tipFormatter={value => `${value}$`} />
</div>
</div>

Expand Down
13 changes: 0 additions & 13 deletions pages/forgot-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,6 @@ const ForgotPassword = () => {
<p className="message message--error">Please write a valid email</p>
}
</div>

<div className="form__input-row">
<input
className="form__input"
type="password"
placeholder="Password"
name="password"
ref={register({ required: true })}
/>
{errors.password && errors.password.type === 'required' &&
<p className="message message--error">This field is required</p>
}
</div>

<button type="submit" className="btn btn--rounded btn--yellow btn-submit">Reset password</button>
</form>
Expand Down
5 changes: 4 additions & 1 deletion pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type LoginMail = {
password: string;
}


const LoginPage = () => {
const { register, handleSubmit, errors } = useForm();

Expand All @@ -18,6 +19,7 @@ const LoginPage = () => {
password: data.password
});


console.log(res);
};

Expand Down Expand Up @@ -54,8 +56,9 @@ const LoginPage = () => {
}

{errors.email && errors.email.type === 'pattern' &&
<p className="message message--error">Please write a valid email</p>
<p className="message message--error">Please enter a valid email</p>
}

</div>

<div className="form__input-row">
Expand Down
2 changes: 1 addition & 1 deletion pages/product/[pid].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Product = ({ product }: ProductPageType) => {
<div className="product-single__info">
<div className="product-single__info-btns">
<button type="button" onClick={() => setShowBlock('description')} className={`btn btn--rounded ${showBlock === 'description' ? 'btn--active' : ''}`}>Description</button>
<button type="button" onClick={() => setShowBlock('reviews')} className={`btn btn--rounded ${showBlock === 'reviews' ? 'btn--active' : ''}`}>Reviews (2)</button>
<button type="button" onClick={() => setShowBlock('reviews')} className={`btn btn--rounded ${showBlock === 'reviews' ? 'btn--active' : ''}`}>Reviews ({product.reviews.length})</button>
</div>

<Description show={showBlock === 'description'} />
Expand Down