How did the passage of the black codes affect the social and economic status of African Americans during the Reconstruction era?