-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #2174 coming soon section in marketplace
- Loading branch information
Cuong Vu
committed
Jul 28, 2020
1 parent
b5c16e1
commit 1c079ed
Showing
14 changed files
with
1,054 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
836 changes: 836 additions & 0 deletions
836
packages/marketplace/src/components/pages/apps/__tests__/__snapshots__/apps.test.tsx.snap
Large diffs are not rendered by default.
Oops, something went wrong.
161 changes: 161 additions & 0 deletions
161
...s/marketplace/src/components/pages/apps/__tests__/__snapshots__/coming-soon.test.tsx.snap
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,161 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ComingSoonApps should match a snapshot 1`] = ` | ||
<Component | ||
isMultiLine={true} | ||
> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
<Component | ||
key="" | ||
> | ||
<div | ||
className="card" | ||
> | ||
<div | ||
className="card-image" | ||
> | ||
<img | ||
className="image" | ||
onError={[Function]} | ||
src="" | ||
/> | ||
</div> | ||
</div> | ||
</Component> | ||
</Component> | ||
`; |
10 changes: 10 additions & 0 deletions
10
packages/marketplace/src/components/pages/apps/__tests__/coming-soon.test.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 * as React from 'react' | ||
import { shallow } from 'enzyme' | ||
|
||
import ComingSoonApps from '../coming-soon' | ||
|
||
describe('ComingSoonApps', () => { | ||
it('should match a snapshot', () => { | ||
expect(shallow(<ComingSoonApps />)).toMatchSnapshot() | ||
}) | ||
}) |
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
45 changes: 45 additions & 0 deletions
45
packages/marketplace/src/components/pages/apps/coming-soon.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,45 @@ | ||
import * as React from 'react' | ||
import { GridThreeColItem, Grid } from '@reapit/elements' | ||
import placeHolderImage from '@/assets/images/default-feature-image.jpg' | ||
import comingSoonImage1 from '@/assets/images/coming-soon/1Area.jpg' | ||
import comingSoonImage2 from '@/assets/images/coming-soon/2Starberry.jpg' | ||
import comingSoonImage3 from '@/assets/images/coming-soon/3IAMProperty.jpg' | ||
import comingSoonImage4 from '@/assets/images/coming-soon/4SMS.jpg' | ||
import comingSoonImage5 from '@/assets/images/coming-soon/5Vyomm.jpg' | ||
import comingSoonImage6 from '@/assets/images/coming-soon/6Spectre.jpg' | ||
import comingSoonImage7 from '@/assets/images/coming-soon/7Twentyci.jpg' | ||
import comingSoonImage8 from '@/assets/images/coming-soon/8Zero.jpg' | ||
import comingSoonImage9 from '@/assets/images/coming-soon/9Yomdel.jpg' | ||
|
||
export const onImageError = (event: React.SyntheticEvent<HTMLImageElement>) => | ||
(event.currentTarget.src = placeHolderImage) | ||
|
||
const comingSoonImagesList = [ | ||
comingSoonImage1, | ||
comingSoonImage2, | ||
comingSoonImage3, | ||
comingSoonImage4, | ||
comingSoonImage5, | ||
comingSoonImage6, | ||
comingSoonImage7, | ||
comingSoonImage8, | ||
comingSoonImage9, | ||
] | ||
|
||
const ComingSoonApps: React.FC = () => { | ||
return ( | ||
<Grid isMultiLine> | ||
{comingSoonImagesList.map(imgSrc => ( | ||
<GridThreeColItem key={imgSrc}> | ||
<div className="card"> | ||
<div className="card-image"> | ||
<img className="image" src={imgSrc} onError={onImageError} /> | ||
</div> | ||
</div> | ||
</GridThreeColItem> | ||
))} | ||
</Grid> | ||
) | ||
} | ||
|
||
export default ComingSoonApps |