-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/fe web layout #10
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
base: dev
Are you sure you want to change the base?
Conversation
Implemented the layout for the header section with navigation and middle section BREAKING CHANGE: 🧨 Changed the structure of the `Header` component, which may require updates to its usage in ✅ Closes: other parts of the application. The `header` element is now wrapped with a `div` and requires
|
Fix merge conflicts |
| export default function Account() { | ||
| return ( | ||
| <div className={styles.account}> | ||
| <p>Sign In</p> / <p>Sign Up</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to use localization
| .callNow { | ||
| display: flex; | ||
| align-items: center; | ||
| .phoneNumber { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use nested styles here
| <div className={styles.callNow}> | ||
| <Image src={Phone} alt='phone' /> | ||
| <a href='tel:2195550114' className={styles.phoneNumber}> | ||
| (219) 555-0114 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be hardcoded, we need to allow admins to customize telephone, emails, etc.
| .wrapper { | ||
| width: 100%; | ||
| background-color: $gray-800; | ||
| .nav { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove nested styles
| @@ -0,0 +1,16 @@ | |||
| .smallOne, | |||
| .midle { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename midle
|
|
||
| import DropDown from '../../assets/images/Drop Down.svg'; | ||
|
|
||
| export default function SmallOne() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like this name
| <div className={styles.option}> | ||
| <p>Eng</p> | ||
| <Image src={DropDown} alt='Drop Down' /> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be in separate component
| <div className={styles.option}> | ||
| <p>USD</p> | ||
| <Image src={DropDown} alt='Drop Down' /> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be in separate component
|
|
||
| import styles from './SmallOne.module.scss'; | ||
|
|
||
| import DropDown from '../../assets/images/Drop Down.svg'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import DropDown from '../../assets/images/Drop Down.svg'; | |
| import DropDownIcon from '../../assets/images/dropdown-icon.svg'; |
| @@ -0,0 +1,31 @@ | |||
| .smallOne { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove nested styles
Rename smallOne to another name
|
add link to the task from Jira |
rename component Midle to HeaderActions, removed nested styles file, added new component InfoOptions BREAKING CHANGE: 🧨 rename component Midle to HeaderActions, removed nested styles file, added new component InfoOptions
created new component Price BREAKING CHANGE: 🧨 created new component Price ✅ Closes: created new component Price
| import styles from './CallNow.module.scss'; | ||
|
|
||
| const phoneNumber = 2195550114; | ||
| const phoneDisplay = '(219) 555-0114'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use https://www.npmjs.com/package/react-phone-number-input for number formatting
| return ( | ||
| <div className={styles.callNow}> | ||
| <Image src={Phone} alt='phone' /> | ||
| <a href={`tel:${phoneNumber}`} className={styles.phoneNumber}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create separate shared PhoneNumber component
| <div className={styles.selector}> | ||
| <InfoOption>Eng</InfoOption> | ||
| <InfoOption>USD</InfoOption> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be separate component
| <InfoOption>Eng</InfoOption> | ||
| <InfoOption>USD</InfoOption> | ||
| </div> | ||
| <span className={styles.divider}>|</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be separate component
fix layout header BREAKING CHANGE: 🧨 fix layout header ✅ Closes: fix layout header
added component layout BREAKING CHANGE: 🧨 added component layout ✅ Closes: added component layout
| styles[variant], | ||
| styles[fill], | ||
| styles[size], | ||
| isHovered && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove it, and do it with css only
| padding-top: 16px; | ||
|
|
||
| p { | ||
| padding: 0 !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove important usage
| const navLinks = [ | ||
| { href: '/', label: 'Home', isOption: true, isActive: true }, | ||
| { href: '/Shop', label: 'Shop', isOption: true }, | ||
| { href: '/Pages', label: 'Pages', isOption: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename pages routes
| @@ -0,0 +1,4 @@ | |||
| <svg width="17" height="20" viewBox="0 0 17 20" fill="none" xmlns="http://www.w3.org/2000/svg"> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use spaces in names, check all places
Rename all icons to lower case
| @@ -0,0 +1,16 @@ | |||
| import Image from 'next/image'; | |||
| import Phone from '../../assets/images/PhoneCall.svg'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assets importing should be in this format
// index.ts
export { ReactComponent as PhoneIcon } from './phone-icon.svg';
// Component file
import { PhoneIcon } from '@assets/icons';
<PhoneIcon/>| border-radius: 50%; | ||
| } | ||
|
|
||
| .activeIcon { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .activeIcon { | |
| .active { |
| @@ -0,0 +1,17 @@ | |||
| .socialIcons { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .socialIcons { | |
| .icons { |
| ]; | ||
|
|
||
| export default function SocialMedia() { | ||
| const [hovered, setHovered] = useState<string | null>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const [hovered, setHovered] = useState<string | null>(null); |
| className={ | ||
| hovered === name | ||
| ? `${styles.activeIcon} ${styles.icon}` | ||
| : styles.icon | ||
| } | ||
| onMouseEnter={() => setHovered(name)} | ||
| onMouseLeave={() => setHovered(null)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| className={ | |
| hovered === name | |
| ? `${styles.activeIcon} ${styles.icon}` | |
| : styles.icon | |
| } | |
| onMouseEnter={() => setHovered(name)} | |
| onMouseLeave={() => setHovered(null)} |
| @@ -0,0 +1,13 @@ | |||
| .subscribeWrapper { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to wrapper
added layout heder