INNER CODE UNIT · JavaScript

toggleLayoutOrientation

ekzhang/setwithfriends · src/App.js:48

  const toggleLayoutOrientation = () => {
    setLayoutOrientation((x) => (x === "portrait" ? "landscape" : "portrait"));
  };
  const toggleCardOrientation = () => {
    setCardOrientation((x) => (x === "vertical" ? "horizontal" : "vertical"));
  };

  const [volume, setVolume] = useStorage("volume", "on");

  useEffect(() => {
    return firebase.auth().onAuthStateChanged((user) => {
      if (user) {
        // User is signed in.
        setAuthUser({ ...user._delegate });
      } else {
        // User is signed out.
        setAuthUser(null);
        firebase

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…