How to fix Cannot use forwardRef without type parameter for ref in React | DevErrors