feat: reduce dependency on router and move everything to route props instead
This commit is contained in:
parent
1e4ef96150
commit
84f177c80e
7 changed files with 50 additions and 29 deletions
3
src/helpers/time/getNextWeekDate.ts
Normal file
3
src/helpers/time/getNextWeekDate.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export function getNextWeekDate(): Date {
|
||||
return new Date((new Date()).getTime() + 7 * 24 * 60 * 60 * 1000)
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
export function parseDateOrString(rawValue: string, fallback: any): string | Date {
|
||||
export function parseDateOrString(rawValue: string | undefined, fallback: any): string | Date {
|
||||
if (typeof rawValue === 'undefined') {
|
||||
return fallback
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue