How to repair right joycon

How can i fix my right joycon it will not connect to my switch will only work wireless an i replaced the rail already an still nothing

Hey there,
it’s hard to work with this little information. Check the joycon’s connector on the mainboard for shorts. Especially check pin 10 and 3. Pin 3 must not have continuity to ground if the console is turned off.