is suntanning ok?

can you still suntan while pregnant? i wanna go to the beach i really need a tan but i’m nervous lol. i’m 29 weeks now, is there a certain time limit or should i just make sure i’m hydrated the whole time?