-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d9ec4a
commit b78732d
Showing
7 changed files
with
57 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { format, subDays } from 'date-fns' | ||
|
||
export const getDate = (sub: number = 0) => { | ||
const dateXDaysAgo = subDays(new Date(), sub) | ||
|
||
return format(dateXDaysAgo, 'dd/MM/yyyy') | ||
} |
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,9 +1,3 @@ | ||
import { format, subDays } from 'date-fns' | ||
|
||
export const getDate = (sub: number = 0) => { | ||
const dateXDaysAgo = subDays(new Date(), sub) | ||
|
||
return format(dateXDaysAgo, 'dd/MM/yyyy') | ||
} | ||
|
||
export * from './fetcher' | ||
export * from './get-date' | ||
export * from './prevent-default' |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
export const preventDefaultAction = <T extends React.SyntheticEvent>( | ||
event: T | ||
) => { | ||
event.preventDefault() | ||
} |