I am reading the chapter about phase kickback from "An Introduction to Quantum Computing" by Kaye, Laflamme, Mosca. I understand why $U_f :|x \rangle |-\rangle \rightarrow (-1)^{f(x)} |x\rangle |-\rangle$ is correct. But then it is written that $U_f$ can be thought as a 1-qubit operator $\hat{U}_{f(x)}$ acting on the second qubit controlled by the state $|x\rangle$. I don't get why this is true and why the circuits below are equivalent.
For instance if $f(0)=1$, then $U_f:|0\rangle|-\rangle \rightarrow - |0\rangle |-\rangle$, but this is not the case for the circuit given on the right since if $|x\rangle=0$, no operation is applied on the second register.
Can someone show me what I am missing?