-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3172: Fix default view issue, change header props
Reorganize code blocks better, add more comments
- Loading branch information
1 parent
2ce7eb8
commit f745e9a
Showing
7 changed files
with
50 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
import { | ||
yearNextAction, | ||
yearPrevAction | ||
NEXT_ACTIONS, | ||
PREV_ACTIONS | ||
} from "components/Calendar/actions/buttonActions" | ||
import VIEWS from "components/Calendar/utils/constants" | ||
import { yearTitleFormat } from "components/Calendar/utils/formats" | ||
import { TITLE_FORMATS } from "components/Calendar/utils/formats" | ||
|
||
export function defaultNextAction(dispatch, state) { | ||
yearNextAction(dispatch, state) | ||
} | ||
export function defaultPrevAction(dispatch, state) { | ||
yearPrevAction(dispatch, state) | ||
} | ||
export const defaultView = VIEWS.MONTHLY | ||
|
||
export const defaultView = VIEWS.YEARLY | ||
export const defaultNextAction = NEXT_ACTIONS[defaultView] | ||
export const defaultPrevAction = PREV_ACTIONS[defaultView] | ||
|
||
export const defaultTitleFormatter = yearTitleFormat | ||
export const defaultTitleFormatter = TITLE_FORMATS[defaultView] | ||
|
||
export const defaultTitle = defaultTitleFormatter(new Date()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters