From a1e5c126007e3fcc300adc472d5c6f852a0f5b6d Mon Sep 17 00:00:00 2001 From: Alexander Harding Date: Sat, 9 Nov 2024 13:05:13 -0600 Subject: [PATCH] (chore) Upgrade lemmy-js-client Related: https://github.com/aeharding/voyager/issues/1683 --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src/features/auth/siteSlice.ts | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index e99ca341fb..5929595de8 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "es-toolkit": "^1.26.1", "history": "^4.10.1", "ionicons": "^7.4.0", - "lemmy-js-client": "0.20.0-alpha.17", + "lemmy-js-client": "0.20.0-alpha.18", "mdast-util-gfm-autolink-literal-lemmy": "^3.0.0", "mdast-util-gfm-strikethrough": "^2.0.0", "mdast-util-gfm-table": "^2.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e6a05ced49..22535f53b4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -137,8 +137,8 @@ importers: specifier: ^7.4.0 version: 7.4.0 lemmy-js-client: - specifier: 0.20.0-alpha.17 - version: 0.20.0-alpha.17 + specifier: 0.20.0-alpha.18 + version: 0.20.0-alpha.18 mdast-util-gfm-autolink-literal-lemmy: specifier: ^3.0.0 version: 3.0.0 @@ -3794,8 +3794,8 @@ packages: leek@0.0.24: resolution: {integrity: sha512-6PVFIYXxlYF0o6hrAsHtGpTmi06otkwNrMcmQ0K96SeSRHPREPa9J3nJZ1frliVH7XT0XFswoJFQoXsDukzGNQ==} - lemmy-js-client@0.20.0-alpha.17: - resolution: {integrity: sha512-4iZQtZNldhioTecSgi1LMR4E3uK5IcQ+EuWg4aAXmciOIHxPXPAHy7qSLuHqbzEiL1QP5G3MFwQnlVf/sJkFaQ==} + lemmy-js-client@0.20.0-alpha.18: + resolution: {integrity: sha512-oZy8DboTWfUar4mPWpi7SYrOEjTBJxkvd1e6QaVwoA5UhqQV1WhxEYbzrpi/gXnEokaVQ0i5sjtL/Y2PHMO3MQ==} leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} @@ -10065,7 +10065,7 @@ snapshots: transitivePeerDependencies: - supports-color - lemmy-js-client@0.20.0-alpha.17: {} + lemmy-js-client@0.20.0-alpha.18: {} leven@3.1.0: {} diff --git a/src/features/auth/siteSlice.ts b/src/features/auth/siteSlice.ts index 25c7090fea..de2da6624e 100644 --- a/src/features/auth/siteSlice.ts +++ b/src/features/auth/siteSlice.ts @@ -55,7 +55,8 @@ export const isAdminSelector = (state: RootState) => state.site.response?.my_user?.local_user_view.local_user.admin; export const isDownvoteEnabledSelector = (state: RootState) => - state.site.response?.site_view.local_site.enable_downvotes !== false; + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO required changes for lemmy v0.20.0 https://github.com/aeharding/voyager/issues/1683 + (state.site.response?.site_view.local_site as any).enable_downvotes !== false; export const localUserSelector = (state: RootState) => state.site.response?.my_user?.local_user_view.local_user;