Now a common ion effect can also occur with acids and bases. Here we can say that the solubility of a base decreases if the solution contains hydroxide ions already.
And we can say that the solubility of an acid also decreases if the solution contains hydronium ion in the form of H+. But also remember we can see hydronium ion in the form of H3O+.
So just remember, common ion effect doesn't only affect ionic solids, it can affect acids and bases as well.