destroy component after leaving transition