-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from fs-jun24-team-3/feature/Base-structure-for…
…-Main-component Feature/base structure for main component
- Loading branch information
Showing
29 changed files
with
198 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ dist-ssr | |
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.tsbuildinfo | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
{ | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"arrowParens": "avoid", | ||
"singleQuote": true, | ||
"semi": true | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"jsxSingleQuote": false, | ||
"printWidth": 80, | ||
"semi": true, | ||
"bracketSpacing": true, | ||
"bracketSameLine": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/components/Main/CategoriesList/CategoriesItem/CategoriesItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
type Props = {}; | ||
|
||
export const CategoriesItem: React.FC<Props> = () => { | ||
return ( | ||
<li className="categoties__item"></li> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './CategoriesItem' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { CategoriesItem } from './CategoriesItem'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
type Props = {}; | ||
|
||
export const CategoriesList: React.FC<Props> = () => { | ||
return ( | ||
<div className="main__categories"> | ||
<h2 className="categories__title">Shop by category</h2> | ||
|
||
<ul className="categories__list"> | ||
{/* TODO: at this stage we need to load phone cards from server, map given list and render it */} | ||
<CategoriesItem /> | ||
</ul> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './CategoriesList' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { PhoneCard } from "../PhoneCard"; | ||
|
||
type Props = { | ||
sliderTitle: string; | ||
}; | ||
|
||
export const GoodsSlider: React.FC<Props> = ({ sliderTitle }) => { | ||
return ( | ||
<div className="main__slider"> | ||
<div className="slider__header"> | ||
<h2 className="slider__title">{sliderTitle}</h2> | ||
|
||
<div className="slider__interactive-part"> | ||
<button className="slider__button slider__button--prev"></button> | ||
|
||
<button className="slider__button slider__button--next"></button> | ||
</div> | ||
</div> | ||
<ul className="slider__list"> | ||
{/* TODO: at this stage we need to load phone cards from server, map given list and render it */} | ||
<PhoneCard /> | ||
</ul> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './GoodsSlider' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import { GoodsSlider } from '../GoodsSlider'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
type Props = {}; | ||
|
||
export const HotPricesList: React.FC<Props> = () => { | ||
return ( | ||
<GoodsSlider sliderTitle={'Hot prices'} /> | ||
); | ||
}; | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './HotPricesList' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@import '../../styles/mixins/mixins.scss'; | ||
|
||
.main { | ||
grid-column: 1 / -1; | ||
|
||
&__title { | ||
margin: 56px 0; | ||
} | ||
|
||
&__content { | ||
@include mainContentGrid; | ||
} | ||
|
||
&__slider, &__categories, &__banner-slider { | ||
display: flex; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
import React from 'react'; | ||
import './Main.scss'; | ||
import { MainBannerSlider } from './MainBannerSlider'; | ||
import { NewModelList } from './NewModelsList'; | ||
import { CategoriesList } from './CategoriesList'; | ||
import { HotPricesList } from './HotPricesList'; | ||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
type Props = {}; | ||
|
||
export const Main: React.FC<Props> = () => { | ||
return <div className="main-content"></div>; | ||
return ( | ||
<main className="main"> | ||
<h1 className="main__title">Welcome to Nice Gadgets store!</h1> | ||
<div className="main__content"> | ||
<MainBannerSlider /> | ||
|
||
<NewModelList /> | ||
|
||
<CategoriesList /> | ||
|
||
<HotPricesList /> | ||
</div> | ||
</main> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
type Props = {}; | ||
|
||
export const MainBannerSlider: React.FC<Props> = () => { | ||
return ( | ||
<div className="main__banner-slider"> | ||
<div className="banner-slider__interactive-part"> | ||
<button className="banner-slider__button banner-slider__button--prev"></button> | ||
|
||
<div className="banner-slider__banner"></div> | ||
|
||
<button className="banner-slider__button banner-slider__button--next"></button> | ||
</div> | ||
|
||
<div className="banner-slider__indicator"></div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './MainBannerSlider' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
import { GoodsSlider } from '../GoodsSlider'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
type Props = {}; | ||
|
||
export const NewModelList: React.FC<Props> = () => { | ||
return <GoodsSlider sliderTitle={'Brand new models'} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './NewModelList' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import './PhoneCard.scss' | ||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
type Props = {}; | ||
|
||
export const PhoneCard: React.FC<Props> = () => { | ||
return ( | ||
<li className='slider__item'></li> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './PhoneCard' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { createRoot } from 'react-dom/client'; | ||
import './index.css'; | ||
import './index.scss'; | ||
import { Root } from './Root.tsx'; | ||
|
||
createRoot(document.getElementById('root')!).render(<Root />); | ||
createRoot(document.getElementById('root') as HTMLElement).render(<Root />); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
@import '../../styles/mixins/mixins.scss'; | ||
@import '../../styles/mixins/mixins.scss'; | ||
|
||
.grid-container { | ||
.main-page { | ||
font-family: 'Montserrat', sans-serif; | ||
@include mainPageGrid(); | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"root":["./src/app.tsx","./src/root.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/app/reduxhooks.ts","./src/app/store.ts"],"version":"5.6.2"} | ||
{"root":["./src/app.tsx","./src/root.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/app/reduxhooks.ts","./src/app/store.ts","./src/components/footer/footer.tsx","./src/components/footer/index.ts","./src/components/footer/navfooter/navfooter.tsx","./src/components/footer/navfooter/index.ts","./src/components/header/header.tsx","./src/components/header/index.ts","./src/components/header/navheader/navheader.tsx","./src/components/header/navheader/index.ts","./src/components/main/main.tsx","./src/components/main/index.ts","./src/components/main/categorieslist/categorieslist.tsx","./src/components/main/categorieslist/index.ts","./src/components/main/categorieslist/categoriesitem/categoriesitem.tsx","./src/components/main/categorieslist/categoriesitem/index.ts","./src/components/main/hotpriceslist/hotpriceslist.tsx","./src/components/main/hotpriceslist/index.ts","./src/components/main/hotpriceslist/hotpricesitem/hotpricesitem.tsx","./src/components/main/hotpriceslist/hotpricesitem/index.ts","./src/components/main/mainslider/mainslider.tsx","./src/components/main/mainslider/index.ts","./src/components/main/newmodelslist/newmodellist.tsx","./src/components/main/newmodelslist/index.ts","./src/components/main/newmodelslist/newmodelitem/newmodelitem.tsx","./src/components/main/newmodelslist/newmodelitem/index.ts","./src/components/onlymobile/aside/aside.tsx","./src/components/onlymobile/aside/index.ts","./src/components/onlymobile/aside/asidefooter/asidefooter.tsx","./src/components/onlymobile/aside/asidefooter/index.ts","./src/components/onlymobile/aside/asideheader/asideheader.tsx","./src/components/onlymobile/aside/asideheader/index.ts","./src/components/onlymobile/aside/asidenav/asidenav.tsx","./src/components/onlymobile/aside/asidenav/index.ts","./src/pages/mainpage/mainpage.tsx","./src/pages/mainpage/index.ts","./src/pages/notfoundpage/notfoundpage.tsx","./src/pages/notfoundpage/index.tsx"],"version":"5.6.2"} |