This is misleading in several ways.
1. GDP on a currency exchange rate bases does not reflect the scale of productivity, rather it is skewed by current account balance and differences of prices for goods not normally purchased or sold internationally. So using GDP in nominal dollars is not a valid measure of economic output or productivity.
2. On purchase power parity basis, which actually does measure the real size of the economy, India’s GDP in 2020 is about 9 trillion dollars. That of the continent of Africa is about 6 trillion dollars. So no, India is not poorer than Africa on per capita basis. By comparison, that of China in 2020 is about 21 trillion dollars, and that of the US 19 trillion dollars. But, adjusted for inflation, China’s GDP PPP was the same as India’s now as recently as 2007.
3. As recently as 2002, China’s overall GDP on PPP basis was lower than that or Africa. So less 20 years go, one could have ridiculed China’s economy with the same comparison you invoked, except the comparison could have been in PPP terms, which is valid and meaningful, unlike yours.
So again, looking even slightly below the surface, you see India is not nearly as far behind China as many people in China seems prefer to think. 15 - 20 years still seems a good number.
4. While Africa is certainly the poorest continent, and abject poverty is rampant in parts of the continent, major parts of Africa is not as poor as you think. On a purchase power parity basis, in 2020 the GDP per capita of 12 African countries was greater than $10,000, or richer, on per capita basis, than some European countries such as Ukraine and Kosovo. To give a comparative indication, Averaged overall, Africa’s GDP PPP per capita is roughly equal to that of Vietnam. So even when seen overall, the continent of Africa is poor, but not quite as poor as being suitable to use as stand in for abject poverty, as you so apparently gleefully think.
GDP isn't very good at discerning the details. I will make 1 point. China's GDP 15 - 20 years ago was a much larger percentage of total global GDP back then compared to India's percentage of total global GDP right now.