It motivates both.
It motivates Democrats who before the leak didn't really have a concrete focus, other than keeping a republican party that has become more and more extreme out of control in the Senate and Congress. The Democratic party has been to passive, mostly letting the Republican agenda of attacking black history in schools and the LGBTQ community speak for itself. Not enough. They now have a rallying cry.
The leak has energized Democratic voters who will vote in droves this fall to stop the attack on women's rights.
The Republicans are also motivated. While there may be a select few conservatives who are not totally against abortion, most on the right are including the religious conservatives and the far right which make up big swaths of voters for the political party.
The Republican agenda has drifted further right attacking racial and gender divides in our schools and across our country. Now a conservative majority supreme court has preliminarly voted down Roe V Wade. It's a conservatives dream come true and will push those who desire to see the continued destruction of liberal progress to the voting booth this fall.
It's interesting that a first assumption many would believe a liberal source leaked the ruling. But, I could equally see the right doing it. Get it out there before it's actually ruled on. Take the quick wave of sharp criticism from the left and at the same motivate your own voters. Add to an agenda that already is taking large swipes at progress and working to make America great again. Then when the ruling actually happens, it's no surprise, the reaction is not so heavy and is endurable.