Its normaly not a good idea to keep any animal that lives in a glass or plastic enclosure in direct sunlight be it a fish, mantis, turtle, etc. Its just like being trapped inside a car sitting in the sun on a hot day. It doesnt take long for the sun to heat the insides of anything thats closed up.