Property 'worker' does not exist on type 'IntrinsicAttributes'

Viewed 59

TS2322: Type '{ key: any; worker: any; }' is not assignable to type 'IntrinsicAttributes'. Property 'worker' does not exist on type 'IntrinsicAttributes'.

How i can fix this problem?

const UserManegmentList = () => {
  const { workers } = useSelector((state: RootState) => state.taskContent);
  const { projects } = useSelector((state: RootState) => state.projects);

  const dispatch = useDispatch();

  useEffect(() => {
    dispatch(getAllWorkers());
  }, []);

  console.log(workers);

  return (
    <>
     
      <Table>
        <Thead>
          <Tr>
            <Tdhead>Full name</Tdhead>
            <Tdhead>Role</Tdhead>
            <Tdhead>Projects</Tdhead>
            <Tdhead>actions</Tdhead>
          </Tr>
        </Thead>
        <tbody>
          {workers.map((worker: any) => (
            <UserManagerComponent key={worker.idUser} worker={worker}/>
         
          ))}
        </tbody>
0 Answers
Related