12
src/utils/hooks.js
Normal file
12
src/utils/hooks.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useIntl } from '@edx/frontend-platform/i18n';
|
||||
|
||||
import dateFormatter from './dateFormatter';
|
||||
|
||||
export const useFormatDate = () => {
|
||||
const { formatDate } = useIntl();
|
||||
return (date) => dateFormatter(formatDate, date);
|
||||
};
|
||||
|
||||
export default {
|
||||
useFormatDate,
|
||||
};
|
||||
Reference in New Issue
Block a user