This PR takes into account the user selected language to format the time in the Time component. Co-authored-by: tommoor <tom.moor@gmail.com>
13 lines
214 B
JavaScript
13 lines
214 B
JavaScript
// @flow
|
|
import useStores from "./useStores";
|
|
|
|
export default function useUserLocale() {
|
|
const { auth } = useStores();
|
|
|
|
if (!auth.user) {
|
|
return undefined;
|
|
}
|
|
|
|
return auth.user.language.split("_")[0];
|
|
}
|