  We use a combinatorial result relating the discriminant of the cycle pairing
on a weighted finite graph to the eigenvalues of its Laplacian to deduce a
formula for the orders of component groups of Jacobians of modular curves
arising from quaternion algebras over $\mathbb{F}_q(T)$ or $\mathbb{Q}$. Our
formula over $\mathbb{Q}$ recovers a result of Jordan and Livn\'e.
