useState array not updated when invoking function from another screen

join shbcf.ru