How can I reduce duplication in react while using useState

welcome to shbcf.ru