Skip to content

Commit a975806

Browse files
authored
Fix example in tutorial
Updated the example in the documentation to better reflect the current functionality more clearly and concisely for users
1 parent 025adaa commit a975806

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/tutorials/essentials/part-8-rtk-query-advanced.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ import { createAppAsyncThunk } from '@/app/withTypes'
403403

404404
// highlight-next-line
405405
import { apiSlice } from '@/features/api/apiSlice'
406-
import { selectCurrentUsername } from '@/features/auth/authSlice'
406+
import { selectCurrentUserId } from '@/features/auth/authSlice'
407407

408408
export interface User {
409409
id: string
@@ -433,9 +433,9 @@ export const selectUserById = createSelector(
433433
)
434434

435435
export const selectCurrentUser = (state: RootState) => {
436-
const currentUsername = selectCurrentUsername(state)
437-
if (currentUsername) {
438-
return selectUserById(state, currentUsername)
436+
const currentUserId = selectCurrentUserId(state)
437+
if (currentUserId) {
438+
return selectUserById(state, currentUserId)
439439
}
440440
}
441441
// highlight-end

0 commit comments

Comments
 (0)