mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
Merge remote-tracking branch 'origin/master' into AD-499-whitelabel-prize-with-sluice-as-k
This commit is contained in:
commit
26f35d7628
@ -34,7 +34,7 @@ let SlidesContainer = React.createClass({
|
|||||||
// check if slide_num was defined, and if not then default to 0
|
// check if slide_num was defined, and if not then default to 0
|
||||||
let queryParams = this.getQuery();
|
let queryParams = this.getQuery();
|
||||||
if(!('slide_num' in queryParams)) {
|
if(!('slide_num' in queryParams)) {
|
||||||
this.transitionTo(this.getPathname(), null, {slide_num: 0});
|
this.replaceWith(this.getPathname(), null, {slide_num: 0});
|
||||||
}
|
}
|
||||||
|
|
||||||
// init container width
|
// init container width
|
||||||
@ -60,7 +60,7 @@ let SlidesContainer = React.createClass({
|
|||||||
setSlideNum(slideNum) {
|
setSlideNum(slideNum) {
|
||||||
if(slideNum < 0 || slideNum < React.Children.count(this.props.children)) {
|
if(slideNum < 0 || slideNum < React.Children.count(this.props.children)) {
|
||||||
|
|
||||||
this.transitionTo(this.getPathname(), null, {slide_num: slideNum});
|
this.replaceWith(this.getPathname(), null, {slide_num: slideNum});
|
||||||
this.setState({
|
this.setState({
|
||||||
slideNum: slideNum
|
slideNum: slideNum
|
||||||
});
|
});
|
||||||
@ -104,4 +104,4 @@ let SlidesContainer = React.createClass({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default SlidesContainer;
|
export default SlidesContainer;
|
||||||
|
@ -3,11 +3,19 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PieceList from '../../../piece_list';
|
import PieceList from '../../../piece_list';
|
||||||
|
|
||||||
|
import ButtonLink from 'react-router-bootstrap/lib/ButtonLink';
|
||||||
|
|
||||||
|
|
||||||
let PrizePieceList = React.createClass({
|
let PrizePieceList = React.createClass({
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<PieceList redirectTo="register_piece" />
|
<div>
|
||||||
|
<ButtonLink to="register_piece">
|
||||||
|
Submit a new artwork to the prize
|
||||||
|
</ButtonLink>
|
||||||
|
|
||||||
|
<PieceList redirectTo="register_piece" />
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user