From a975806e130b6d3a1ecc2328d502e1e57d322118 Mon Sep 17 00:00:00 2001 From: Kozyrev Vladislav <76097937+dalvine@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:48:57 +0300 Subject: [PATCH] Fix example in tutorial Updated the example in the documentation to better reflect the current functionality more clearly and concisely for users --- docs/tutorials/essentials/part-8-rtk-query-advanced.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tutorials/essentials/part-8-rtk-query-advanced.md b/docs/tutorials/essentials/part-8-rtk-query-advanced.md index aff8c2ad21..a5ab328bab 100644 --- a/docs/tutorials/essentials/part-8-rtk-query-advanced.md +++ b/docs/tutorials/essentials/part-8-rtk-query-advanced.md @@ -403,7 +403,7 @@ import { createAppAsyncThunk } from '@/app/withTypes' // highlight-next-line import { apiSlice } from '@/features/api/apiSlice' -import { selectCurrentUsername } from '@/features/auth/authSlice' +import { selectCurrentUserId } from '@/features/auth/authSlice' export interface User { id: string @@ -433,9 +433,9 @@ export const selectUserById = createSelector( ) export const selectCurrentUser = (state: RootState) => { - const currentUsername = selectCurrentUsername(state) - if (currentUsername) { - return selectUserById(state, currentUsername) + const currentUserId = selectCurrentUserId(state) + if (currentUserId) { + return selectUserById(state, currentUserId) } } // highlight-end