Did I do the right thing leaving her?

So I broke up with my kinda (it's strange but basically she told everyone I was her boyfriend but I wasn't allowed to tell anyone she was my girlfriend) girlfriend last night and now I'm rethinking it a bit. See its only been 4 weeks of knowing here and maybe 2 of being together but it was already a bit too much. She would make up things just so she could be different and was just in general clingy (in fairness she accused me of the same thing so idk) so I was already looking for a out. Then last night a friend who is black texted her because she said she was lonely and I wasn't about to deal with this crap and upon finding out his ethnicity she texts me that she would never talk to a n word (she said the uncensored version I'm just uncomfortable with saying it) and proceeded to basically grill me on why I was hanging out with him. So I was hold up you Wana take a step back because that is racist asf? She goes no and that she knows it's racist but it's the truth. So abut 20 mins after that I lay it out a break up with her and blocked her. I know she has been saying she wants to work it out but I am so not in the mood that I called off of my math class just to avoid her. it's just like with me I can't handle that bs rn. Thing is now I'm sitting here going did I do the right thing? Like what if I could fix her?
Did I do the right thing leaving her?
Add Opinion