Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
1cee3c68
Commit
1cee3c68
authored
Sep 11, 2018
by
Linda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed some leftovers
parent
7313f265
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
src/components/modal/addtostudio/animate-hoc.jsx
src/components/modal/addtostudio/animate-hoc.jsx
+3
-7
src/components/modal/addtostudio/studio-button.jsx
src/components/modal/addtostudio/studio-button.jsx
+1
-4
No files found.
src/components/modal/addtostudio/animate-hoc.jsx
View file @
1cee3c68
...
...
@@ -23,13 +23,9 @@ const AnimateHOC = Component => {
this
.
handleClick
=
this
.
handleClick
.
bind
(
this
);
}
handleClick
()
{
if
(
this
.
state
.
wasClicked
)
{
// if the button has been clicked before
this
.
props
.
onClick
(
this
.
props
.
id
);
}
else
{
this
.
setState
({
// else tell the state that the button has been clicked
wasClicked
:
true
},
()
=>
this
.
props
.
onClick
(
this
.
props
.
id
));
// callback after state has been updated
}
this
.
setState
({
// else tell the state that the button has been clicked
wasClicked
:
true
},
()
=>
this
.
props
.
onClick
(
this
.
props
.
id
));
// callback after state has been updated
}
render
()
{
const
{
wasClicked
}
=
this
.
state
;
...
...
src/components/modal/addtostudio/studio-button.jsx
View file @
1cee3c68
...
...
@@ -8,7 +8,6 @@ require('./modal.scss');
const
StudioButton
=
({
hasRequestOutstanding
,
id
,
includesProject
,
title
,
onClick
,
...
...
@@ -49,7 +48,6 @@ const StudioButton = ({
{
'
studio-selector-button-selected
'
:
includesProject
&&
!
hasRequestOutstanding
}
)
}
data
-
id=
{
id
}
onClick=
{
onClick
}
>
<
div
...
...
@@ -60,7 +58,7 @@ const StudioButton = ({
)
}
title=
{
title
}
>
{
title
}
{
wasClicked
}
{
title
}
</
div
>
<
div
className=
{
classNames
(
...
...
@@ -78,7 +76,6 @@ const StudioButton = ({
StudioButton
.
propTypes
=
{
hasRequestOutstanding
:
PropTypes
.
bool
,
id
:
PropTypes
.
number
,
includesProject
:
PropTypes
.
bool
,
onClick
:
PropTypes
.
func
,
title
:
PropTypes
.
string
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment