-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#207: Calendars Page #286
base: master
Are you sure you want to change the base?
#207: Calendars Page #286
Changes from 7 commits
616d4eb
82e9249
e0f1a86
0b1151c
8231084
11a6325
fb553bf
aa7eedb
387c74a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Component from 'react-pure-render/component' | ||
import './Calendars.scss' | ||
import React from 'react' | ||
|
||
class Calendars extends Component { | ||
render() { | ||
const { | ||
calendars | ||
} = this.props | ||
|
||
const calendarsComponent = Object.keys(calendars) | ||
.map(k => <li key={k}> | ||
<a href={`calendars/${k.replace('cal-', '')}`}>{calendars[k].name}</a> | ||
</li>) | ||
|
||
return ( | ||
<ul className='Calendars'> | ||
<li>Calendars:</li> | ||
{calendarsComponent} | ||
</ul> | ||
) | ||
} | ||
} | ||
|
||
import { connect } from 'react-redux' | ||
import { getAllCalendars } from 'shared/reducers/reducer.js' | ||
|
||
export default connect( | ||
(state, ownProps) => ({ | ||
calendars: getAllCalendars(state, ownProps) | ||
}) | ||
)(Calendars) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.Calendars { | ||
list-style-type: none; | ||
|
||
li { | ||
height: 25px; | ||
width: 240px; | ||
float: left; | ||
text-align: center; | ||
margin-right: 0px; | ||
border: 1px solid #aaa; | ||
padding: 0 20px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't use "px" in CSS, if you look closer to other files they all use "rems". For convenience there is a helper called There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Restuta Done |
||
} | ||
|
||
li:first-child { | ||
border: none; | ||
text-align: right; | ||
} | ||
|
||
li a { | ||
text-decoration: none; | ||
text-transform: uppercase; | ||
} | ||
|
||
li a:hover { | ||
font-weight: bold; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1273,6 +1273,13 @@ core-util-is@~1.0.0: | |
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" | ||
|
||
cross-env@^5.0.0: | ||
version "5.0.0" | ||
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.0.tgz#565ccae4d09676441a5087f406fe7661a29c931b" | ||
dependencies: | ||
cross-spawn "^5.1.0" | ||
is-windows "^1.0.0" | ||
|
||
cross-spawn@^0.2.9: | ||
version "0.2.9" | ||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-0.2.9.tgz#bd67f96c07efb6303b7fe94c1e979f88478e0a39" | ||
|
@@ -1286,6 +1293,14 @@ cross-spawn@^3.0.0: | |
lru-cache "^4.0.1" | ||
which "^1.2.9" | ||
|
||
cross-spawn@^5.1.0: | ||
version "5.1.0" | ||
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" | ||
dependencies: | ||
lru-cache "^4.0.1" | ||
shebang-command "^1.2.0" | ||
which "^1.2.9" | ||
|
||
[email protected]: | ||
version "2.0.5" | ||
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" | ||
|
@@ -2464,6 +2479,10 @@ is-utf8@^0.2.0: | |
version "0.2.1" | ||
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" | ||
|
||
is-windows@^1.0.0: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" | ||
|
||
[email protected]: | ||
version "0.0.1" | ||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" | ||
|
@@ -3665,12 +3684,18 @@ right-align@^0.1.1: | |
dependencies: | ||
align-text "^0.1.1" | ||
|
||
rimraf@2, rimraf@^2.2.8, rimraf@^2.4.4, rimraf@~2.5.0, rimraf@~2.5.1: | ||
rimraf@2, rimraf@^2.2.8, rimraf@~2.5.0, rimraf@~2.5.1: | ||
version "2.5.4" | ||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" | ||
dependencies: | ||
glob "^7.0.5" | ||
|
||
rimraf@^2.6.1: | ||
version "2.6.1" | ||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" | ||
dependencies: | ||
glob "^7.0.5" | ||
|
||
[email protected]: | ||
version "0.2.0" | ||
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-0.2.0.tgz#2bf198bde167cacfa51c0a928e84b68bbe171fce" | ||
|
@@ -3759,6 +3784,12 @@ [email protected]: | |
version "2.2.6" | ||
resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.2.6.tgz#17ddeddc5f722fb66501658895461977867315ba" | ||
|
||
shebang-command@^1.2.0: | ||
version "1.2.0" | ||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" | ||
dependencies: | ||
shebang-regex "^1.0.0" | ||
|
||
shebang-regex@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use
x
in place ofk
orkey
if you want to be explicitThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Restuta Done