Skip to content
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
10 changes: 9 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:7.10
- image: circleci/node:8.11
- image: circleci/mysql:5.7.22
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_ROOT_HOST=%


# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand All @@ -27,6 +32,9 @@ jobs:
- v1-dependencies-

- run: npm install
- run: yarn install
- run: sudo apt install -y mysql-client
- run: mysql -h 127.0.0.1 -u root < ./schema.sql

- save_cache:
paths:
Expand Down
1 change: 1 addition & 0 deletions __mocks__/fileMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = 'test-file-stub';
1 change: 1 addition & 0 deletions __mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
2 changes: 1 addition & 1 deletion client/src/components/Gallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Gallery extends React.Component {

render() {
return (
<div className={styles.wrapper}>
<div className={styles.wrapper} id='gallery'>
<button className={styles.next} onClick={this.handleNextClick} type="button">
{'>'}
</button>
Expand Down
36 changes: 23 additions & 13 deletions client/src/components/Thumbnail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,38 @@ class Thumbnail extends React.Component {

render() {
let thumbnailImg;

if (this.props.current.substring(0, 52) === this.props.thumb.substring(0, 52)) {
thumbnailImg = (
<img
className={styles.thumbnailCurrent}
src={this.props.thumb}
alt=""
onClick={this.props.handleThumbnailClick}
/>
);
if (this.props.current !== undefined) {
if (this.props.current.substring(0, 52) === this.props.thumb.substring(0, 52)) {
thumbnailImg = (
<img
className={styles.thumbnailCurrent}
src={this.props.thumb}
alt=""
onClick={this.props.handleThumbnailClick}
/>
);
} else {
thumbnailImg = (
<img
className={styles.thumbnailImage}
src={this.props.thumb}
alt=""
onClick={this.props.handleThumbnailClick}
/>
);
}
} else {
thumbnailImg = (
<img
className={styles.thumbnailImage}
src={this.props.thumb}
className={styles.thumbnailCurrent}
src="https://s3-us-west-1.amazonaws.com/groupout98hr/default.png"
alt=""
onClick={this.props.handleThumbnailClick}
/>
);
}
return (
<li className={styles.thumbnailListElement}>
<li className={styles.thumbnailListElement} id="thumbnail">
{thumbnailImg}
</li>
);
Expand Down
Loading