The Thomas-Fermi approach and gamma-ray bursts