At least 820 people have been killed and 672 injured, while 205 are said to be seriously hurt.
Videos have since been published on social media showing several buildings being reduced to rubble, while parts of the famous red walls in Marrakech have been damaged.
Now, Smith, 22, has offered her condolences to those affected by the tragedy.
“I can’t believe it,” she wrote in a caption on Instagram alongside a photo of herself strolling through the Medina in Marrakech.
“We only just flew back from this beautiful country just two days ago.
“My thoughts are with all the victims and the families of those who lost their lives in this tragedy.”
Smith had previously been updating fans about her trip on Instagram, posting photos of herself out and about in Marrakech.
Many residents in Marrakech have said they spent the night outside their homes in fear that a second quake might strike the region.
The earthquake was the strongest to hit the north African nation in more than a century.
Smith was awarded runner-up in Strictly Come Dancing when she appeared on the show in 2020.
The actor joined EastEnders when she was just six years old, leaving briefly in 2014, before returning in 2016. She quit for good in 2022, but has since spoken about making a comeback.
Speaking to OK! Magazine, she said: “You never leave EastEnders. I’ve got a family on there that will be there for the next 50 years. I’ll always have a place there.”