Woah woah. A clicking from the dock or switch? One can be very different to the other.
***A switch*** clicking would mean something shorted out in the switch itself. You are screwed 😭 unless you know how to micro solder, in that case good for u :)
***A dock*** clicking may be fixable by scurrying through the electronics and checking maybe a wire crossed over something or your USB-C port is gone.
++HOWEVER++ make sure you unplug the battery (if working on switch) or charger (If working on dock) having them in will not only damage the troubled device further but also possible ***you***.
Good luck mate