Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

formattingLocale.ts

9 lines250 Bytes

1import { createContext, use } from "react";
2​
3import { DEFAULT_LOCALE } from "./locales";
4​
5export const FormattingLocaleContext = createContext(DEFAULT_LOCALE);
6​
7export function useFormattingLocale(): string {
8 return use(FormattingLocaleContext);
9}