My girls don't pay attention as long as it is just a few firecrackers.
But in the 15 minutes after midnight on newyears eve where people shoot a lot of it off, they go bananas.
So I take one dog on each arm and hold them gently but firm, stand at the window and admire the fiireworks. I don't pitty them or comfort them, because doing that confims that there is something to be afraid of.
Instead I "Uuuh" and "aaah" at the lovely fireworks and talk to them like the trainer tought me to talk to them when getting their attention. And of course praise them. In 10 minutes or so they calm down and stop shaking and trying to get away. They can feel that I have it and them under control I guess