Are you mechanically inclined? If so, repairs are probably a small fraction of the cost of a new washer. If you're not mechanically inclined? Hmmm.
First: locate the source of the leak. Many models: there are two screws on the front bottom edge of the control part of the washing machine that holds it down to the top metal surface. Remove these two screws. Others, there aren't any screws - you just slide a putty knife in on the left and right sides to pop the top loose. The control panel lifts up and tilts back, out of the way. There should be an electrical connector from it to the top of the machine. Disconnect. There are two metal spring clips on the top, toward the back, that connect the top surface to the back surface. Pop these out. Now, pull the metal cabinet toward the front of the machine - it will tilt down & then can be lifted out of place so you can see the inside & underneath very well.
See if you can figure out where the leak was coming from. If you can't, if you're slightly electrically inclined, you can remove the lid switch from the cabinet & reconnect it to the control panel. That way, you can run the washing machine without the cabinet. Keep cats away.
Removal of the cabinet takes about 1-2 minutes total. Putting it back: 1 to 2 minutes total. They're made to be very easy to get to internal parts, not that there are many.
What make & model washing machine do you have?