-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
15,088 additions
and
20 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
3 changes: 3 additions & 0 deletions
3
src/components/FeaturedBooks/__snapshots__/featuredBooks.spec.js.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,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`App component renders correctly 1`] = `ShallowWrapper {}`; |
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,14 @@ | ||
import React from 'react'; | ||
import { configure, shallow } from 'enzyme'; | ||
|
||
import Adapter from 'enzyme-adapter-react-16'; | ||
import FeaturedBooks from './index'; | ||
|
||
configure({ adapter: new Adapter() }); | ||
|
||
describe('App component', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow(<FeaturedBooks />); | ||
expect(wrapper).toMatchSnapshot(); | ||
}); | ||
}); |
3 changes: 3 additions & 0 deletions
3
src/components/GenreScroll/__snapshots__/genreScroll.spec.js.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,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`App component renders correctly 1`] = `ShallowWrapper {}`; |
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,14 @@ | ||
import React from 'react'; | ||
import { configure, shallow } from 'enzyme'; | ||
|
||
import Adapter from 'enzyme-adapter-react-16'; | ||
import GenreScroll from './index'; | ||
|
||
configure({ adapter: new Adapter() }); | ||
|
||
describe('App component', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow(<GenreScroll />); | ||
expect(wrapper).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`App component renders correctly 1`] = `ShallowWrapper {}`; |
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,14 @@ | ||
import React from 'react'; | ||
import { configure, shallow } from 'enzyme'; | ||
|
||
import Adapter from 'enzyme-adapter-react-16'; | ||
import Homepage from './index'; | ||
|
||
configure({ adapter: new Adapter() }); | ||
|
||
describe('App component', () => { | ||
it('renders correctly', () => { | ||
const wrapper = shallow(<Homepage />); | ||
expect(wrapper).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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const useShareButton = () => { | ||
const dropdown = document.querySelector('.socials'); | ||
dropdown.classList.toggle('hide'); | ||
}; | ||
|
||
export default useShareButton; |
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,47 @@ | ||
import React from 'react'; | ||
import PropType from 'prop-types'; | ||
import { | ||
FacebookShareButton, | ||
TwitterShareButton, | ||
EmailShareButton, | ||
} from 'react-share'; | ||
import './shareNovel.scss'; | ||
import useShareButton from './effects'; | ||
|
||
const ShareNovel = ({ title }) => { | ||
const shareUrl = window.location.href; | ||
|
||
return ( | ||
<div className="share-novel"> | ||
<button type="button" className="btn" onClick={useShareButton}> | ||
<i className="fas fa-share-alt" /> | ||
</button> | ||
<div className="socials dropdown hide"> | ||
<FacebookShareButton | ||
url={shareUrl} | ||
quote={title} | ||
> | ||
<i className="fab fa-facebook-square" /> | ||
</FacebookShareButton> | ||
<TwitterShareButton | ||
url={shareUrl} | ||
title={title} | ||
> | ||
<i className="fab fa-twitter-square" /> | ||
</TwitterShareButton> | ||
<EmailShareButton | ||
url={shareUrl} | ||
subject={title} | ||
> | ||
<i className="fas fa-envelope" /> | ||
</EmailShareButton> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
ShareNovel.propTypes = { | ||
title: PropType.string.isRequired, | ||
}; | ||
|
||
export default ShareNovel; |
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 @@ | ||
.share-novel { | ||
position: relative; | ||
|
||
.socials { | ||
display: flex; | ||
position: absolute; | ||
|
||
div { | ||
margin: 1rem; | ||
} | ||
|
||
i { | ||
font-size: 24px; | ||
cursor: pointer; | ||
} | ||
|
||
.fa-facebook-square { | ||
color: #3b5998; | ||
} | ||
|
||
.fa-twitter-square { | ||
color: #00acee; | ||
} | ||
} | ||
} |
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
4 changes: 4 additions & 0 deletions
4
src/components/layout/Navbar/__snapshots__/navbar.spec.js.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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`App component renders correctly 1`] = `ReactWrapper {}`; | ||
|
||
exports[`App component renders without crashing 1`] = `ShallowWrapper {}`; | ||
|
||
exports[`App component renders without crashing 2`] = `ShallowWrapper {}`; |
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