Skip to content

Commit

Permalink
fix: update deps (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Feb 23, 2024
1 parent faea8ec commit 56b496e
Show file tree
Hide file tree
Showing 6 changed files with 2,049 additions and 478 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@
"@codemirror/lang-javascript": "^6.2.1",
"@emotion/react": "11.11.3",
"@emotion/styled": "11.11.0",
"@graasp/apps-query-client": "3.4.4",
"@graasp/sdk": "3.4.1",
"@graasp/ui": "4.3.1",
"@graasp/apps-query-client": "^3.4.5",
"@graasp/sdk": "3.8.3",
"@graasp/ui": "4.8.1",
"@mui/icons-material": "5.15.10",
"@mui/lab": "5.0.0-alpha.165",
"@mui/material": "5.15.10",
"@sentry/react": "7.101.1",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-devtools": "^4.36.1",
"@types/node": "20.11.20",
"@types/react": "18.2.56",
"@types/react": "18.2.57",
"@types/react-dom": "18.2.19",
"@uiw/react-codemirror": "^4.21.21",
"@uiw/react-codemirror": "^4.21.22",
"file-saver": "^2.0.5",
"i18next": "^23.7.16",
"i18next": "^23.9.0",
"lodash.groupby": "^4.6.0",
"lucide-react": "^0.330.0",
"lucide-react": "^0.334.0",
"prism-react-renderer": "^2.3.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^14.0.0",
"react-i18next": "^14.0.5",
"react-markdown": "^9.0.1",
"react-mde": "12",
"react-router-dom": "^6.21.2",
"react-mde": "12.0.8",
"react-router-dom": "^6.22.1",
"react-toastify": "10.0.4",
"remark-breaks": "^4.0.0",
"remark-gfm": "^4.0.0",
Expand Down Expand Up @@ -70,7 +70,7 @@
"@commitlint/config-conventional": "18.6.2",
"@cypress/code-coverage": "3.12.24",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/file-saver": "^2",
"@types/file-saver": "^2.0.7",
"@types/i18n": "0.13.10",
"@types/lodash.groupby": "^4.6.9",
"@types/uuid": "9.0.8",
Expand All @@ -93,16 +93,16 @@
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.3",
"husky": "9.0.11",
"miragejs": "^0.1.48",
"nock": "^13.4.0",
"nock": "^13.5.3",
"nyc": "15.1.0",
"prettier": "3.2.5",
"uuid": "9.0.1",
"vite": "^5.0.11",
"vite-plugin-checker": "^0.6.2",
"vite": "^5.1.3",
"vite-plugin-checker": "^0.6.4",
"vite-plugin-istanbul": "^5.0.0",
"vitest": "^1.1.3"
"vitest": "^1.3.0"
},
"browserslist": {
"production": [
Expand Down
5 changes: 3 additions & 2 deletions src/config/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import i18n from 'i18next';
import en from '../langs/en.json';
import fr from '../langs/fr.json';

export const DEFAULT_LANGUAGE = 'en';
export const defaultNS = 'translations';
export const resources = {
en,
Expand All @@ -20,7 +21,7 @@ declare module 'react-i18next' {

i18n.use(initReactI18next).init({
resources,
lng: 'en',
lng: DEFAULT_LANGUAGE,
// debug only when not in production
debug: import.meta.env.DEV,
ns: [defaultNS],
Expand All @@ -30,7 +31,7 @@ i18n.use(initReactI18next).init({
escapeValue: false,
formatSeparator: ',',
},
fallbackLng: 'en',
fallbackLng: DEFAULT_LANGUAGE,
});

export default i18n;
2 changes: 2 additions & 0 deletions src/mocks/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from '@graasp/sdk';

import { API_HOST } from '@/config/env';
import { DEFAULT_LANGUAGE } from '@/config/i18n';

export const mockMembers: CompleteMember[] = [
{
Expand Down Expand Up @@ -45,6 +46,7 @@ export const mockItem: DiscriminatedItem = {
settings: {},
type: ItemType.APP,
extra: { [ItemType.APP]: { url: 'http://localhost:3002' } },
lang: DEFAULT_LANGUAGE,
creator: mockMembers[0],
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
Expand Down
6 changes: 3 additions & 3 deletions src/modules/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useEffect } from 'react';

import { useLocalContext } from '@graasp/apps-query-client';
import { Context, DEFAULT_LANG } from '@graasp/sdk';
import { Context } from '@graasp/sdk';

import i18n from '../config/i18n';
import i18n, { DEFAULT_LANGUAGE } from '../config/i18n';
import AnalyticsView from './main/AnalyticsView';
import BuilderView from './main/BuilderView';
import PlayerView from './main/PlayerView';
Expand All @@ -13,7 +13,7 @@ const App = (): JSX.Element => {

useEffect(() => {
// handle a change of language
const lang = context?.lang ?? DEFAULT_LANG;
const lang = context?.lang ?? DEFAULT_LANGUAGE;
if (i18n.language !== lang) {
i18n.changeLanguage(lang);
}
Expand Down
1 change: 0 additions & 1 deletion src/modules/settings/OrphanComments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const OrphanComments = ({ comments }: Props): JSX.Element | null => {
dataCy={ORPHAN_BUTTON_CYPRESS}
variant="outlined"
color="primary"
sx={{ mr: 1 }}
onClick={() => handleOnClickRemoveOrphans(orphanThreads)}
disabled={orphanThreads.length === 0}
>
Expand Down
Loading

0 comments on commit 56b496e

Please sign in to comment.