Use the hook useUserId to get the id of the user.
const userId = useUserId()