I told her that if she doesn't like her job she should resign.
Why would you suggest she resign from her job?
If she wouldn't like her job, she should find another one.
Instead of discouraging your coworker, a better strategy is to help them feel heard and understood. Being able to empathize might help them better come to terms with their situation.
No one is indispensable in this job. She needs to get out of my way instead of complaining so much.
It might be annoying to have somebody complaining when you are trying to get work done but you shouldn't dismiss her and her problems. It might be good to help and give her support so that you can work together better.