Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
850f20a6
Commit
850f20a6
authored
Apr 12, 2017
by
AuckeBos
Browse files
Added onclick method for events in Calendar
parent
4959f26e
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/actions/event.js
0 → 100644
View file @
850f20a6
export
function
openEvent
(
eventId
)
{
return
null
;
}
app/components/Event.js
View file @
850f20a6
import
React
from
'
react
'
;
import
{
View
,
Text
}
from
'
react-native
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
openEvent
}
from
'
../actions/event
'
;
const
Event
=
(
event
)
=>
<
View
>
...
...
@@ -7,7 +9,17 @@ const Event = (event) =>
<
Text
>
{
new
Date
(
event
.
start
).
toISOString
().
substring
(
0
,
10
)}
<
/Text
>
<
i
>
{
event
.
description
}
<
/i
>
<
Text
>-----------------------------------------<
/Text
>
onPress
=
{()
=>
openEvent
(
event
.
id
)}
<
/View
>
;
Event
.
propTypes
=
{
openEvent
:
React
.
PropTypes
.
func
.
isRequired
,
};
const
mapDispatchToProps
=
dispatch
=>
({
openEvent
:
()
=>
dispatch
(
openEvent
()),
});
export
default
connect
(()
=>
({}),
mapDispatchToProps
)(
Event
);
export
default
Event
;
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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