Skip to content

Commit

Permalink
Add: Add docstring from useUserName
Browse files Browse the repository at this point in the history
Explain using useUserName.
  • Loading branch information
bjoernricks committed Mar 6, 2025
1 parent f26ee10 commit 476643f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/web/hooks/useUserName.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import {useSelector, useDispatch} from 'react-redux';
import {setUsername} from 'web/store/usersettings/actions';
import {getUsername} from 'web/store/usersettings/selectors';

/**
* Custom hook to get and set the username.
*
* @returns {Array} An array containing the current username and a function to set the username.
*/
const useUserName = () => {
const dispatch = useDispatch();
return [
Expand Down

0 comments on commit 476643f

Please sign in to comment.