-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
@@ -1,5 +1,6 @@ | |||
import React from 'react'; | |||
import Box from '@material-ui/core/Box'; | |||
import * as S from './Boards.styles'; |
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.
Do you think using the full name (like Styles
) instead of S
can help with readability?
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 feel like S is short and sweet.
describe('generateBoardName', () => { | ||
beforeAll(() => { | ||
MockDate.set('1/30/2000'); | ||
}); |
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.
Nit: add newline
}); | ||
afterAll(() => { | ||
MockDate.reset(); | ||
}); |
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.
Nit: add newline
@@ -0,0 +1,9 @@ | |||
export default function() { |
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.
Is this redundant given BoardContainer.tsx
?
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.
You mean just leaving this in inline in board container? Can go either way on this one, not opinionated one way or another.
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.
We can keep as is for now and if it makes sense to refactor later, we can do it
|
||
export default function(options?: { client?: typeof firebase }) { | ||
const { firebase } = useContext(FirebaseContext); | ||
const client = (options && options.client) || firebase; |
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.
Minor: you could also write as ternary (no need for change)
import { FirebaseContext } from '../../components/Firebase'; | ||
import { GroupType } from '../types'; | ||
|
||
export default function(options?: { client?: typeof firebase }) { |
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.
Should we type the return value given that it's a Promise
or is that inferred?
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.
Should be inferred
@@ -0,0 +1,16 @@ | |||
import generateBoardName from './generateBoardName'; | |||
const MockDate = require('mockdate'); |
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.
mockdate
might not be that valuable since we can do it ourselves, but I think it's nice for convenience
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.
That's why I added it 😄
LGTM |
2494845
to
85007c7
Compare
Partially resolves #25 and resolves #22