Skip to content

Commit

Permalink
Remove dayjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamahl19 committed Feb 1, 2024
1 parent 29ea6b6 commit ce931e7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@tanstack/react-query-devtools": "5.18.0",
"class-variance-authority": "0.7.0",
"clsx": "2.1.0",
"dayjs": "1.11.10",
"i18next": "23.8.2",
"i18next-browser-languagedetector": "7.2.0",
"jotai": "2.6.4",
Expand Down
8 changes: 0 additions & 8 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import { useCallback, useMemo } from 'react';
import i18next from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import { initReactI18next, useTranslation } from 'react-i18next';
import dayjs from 'dayjs';

// DayJS locales https://github.com/iamkun/dayjs/tree/dev/src/locale
import dayjsEN from 'dayjs/locale/en';

import auth from './en/auth.json';
import bookshelf from './en/bookshelf.json';
Expand All @@ -26,7 +22,6 @@ export const LANGUAGES_CONFIG = {
code: 'en',
name: 'English',
shortName: 'EN',
dayjs: dayjsEN,
resources: {
auth,
bookshelf,
Expand All @@ -42,7 +37,6 @@ export const LANGUAGES_CONFIG = {
code: LanguageCode;
name: string;
shortName: string;
dayjs: object;
resources: object;
}
>;
Expand All @@ -68,8 +62,6 @@ export const useLanguage = () => {
return useMemo(() => [language, setLanguage] as const, [language, setLanguage]);
};

i18next.on('languageChanged', (language) => dayjs.locale(resolveLanguage(language)));

void i18next
.use(LanguageDetector)
.use(initReactI18next)
Expand Down

0 comments on commit ce931e7

Please sign in to comment.