Jamie Lynn Spears' daughter home after ATV accident

Photo: Jamie Lynn Spears on Facebook 

The 8-year-old daughter of actress and singer Jamie Lynn Spears is back at her home in Kentwood, Louisiana after an ATV accident.

Maddie hasn't returned to school yet, but Jamie Lynn shared a sweet picture of the girl celebrating Valentine's Day.

Jamie Lynn says doctors gave permission for Maddie to see her classmates Tuesday and hand out Valentine's Day treats.

"It made her so happy to see her friends, and be able to give them such cute treats," Jamie Lynn posted. "It was a great moment for us after everything that has happened."

Maddie was underwater for several minutes after an ATV she was riding flipped over, the Tangipahoa Parish Sheriff's Office said. Family members who were nearby couldn't free her. An ambulance service arrived and pulled her out.

Jamie Lynn Spears' daughter hospitalized after ATV accident

She had been in critical condition for several days before she was released from the hospital Friday.

It's still hasn't been disclosed if Maddie was driving the ATV or if she was a passenger.

The girl's aunt, pop star Britney Spears, posted a message on her Facebook page Friday announcing her release from the hospital. "So grateful that Maddie was able to go home today ... it's truly a miracle.