Hi,
yes, for some months.
Then, when She/He is an adult, then it's better to go to a greater enclosure as a 45cmx45xmx45cm Exo Terra for example.

If you intend to keep your frog in a 30cmx30cm tank, then you will have to change the substrate more often.