Is this sentence grammatically correct? The dashes are em dashes. This is the last sentence of a paragraph that is in the past tense:
But I continued to work—building, learning, and simply loving what I did—and nothing has been more rewarding.
And if not, can someone explain why and provide the correct way to structure it?