Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IT2810_P2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
IT2810-H19
T
Teams
Team 36
IT2810_P2
Commits
ad58e2b7
Commit
ad58e2b7
authored
Sep 24, 2019
by
Svein Olav Styve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor FavoriteSection
parent
49010f67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
src/App.js
src/App.js
+1
-1
src/components/FavoriteSection.js
src/components/FavoriteSection.js
+7
-10
No files found.
src/App.js
View file @
ad58e2b7
...
...
@@ -184,7 +184,7 @@ class App extends React.Component {
categorySelections
=
{
categorySelections
}
/
>
<
/div
>
<
/div
>
<
FavoriteSection
handler
=
{
this
}
/
>
<
FavoriteSection
save
=
{
this
.
saveAsFavorite
}
open
=
{
this
.
openFavorite
}
/
>
<
SessionElement
sessionHistory
=
{
sessionHistory
}
handler
=
{
this
}
/
>
<
/header
>
<
/div
>
...
...
src/components/FavoriteSection.js
View file @
ad58e2b7
import
React
from
'
react
'
;
import
'
../style/FavoriteButton.css
'
;
export
default
class
FavoriteSection
extends
React
.
Component
{
render
()
{
return
(
<
div
className
=
"
Button-container
"
>
<
button
onClick
=
{
this
.
props
.
handler
.
saveAsFavorite
}
>
Save
as
favorite
<
/button
>
<
button
onClick
=
{
this
.
props
.
handler
.
openFavorite
}
>
Open
favourite
<
/button
>
<
/div
>
);
}
export
default
function
FavoriteSection
(
props
)
{
return
(
<
div
className
=
"
Button-container
"
>
<
button
onClick
=
{
props
.
save
}
>
Save
as
favorite
<
/button
>
<
button
onClick
=
{
props
.
open
}
>
Open
favourite
<
/button
>
<
/div
>
);
}
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