import Taro, { useEffect, useState } from '@tarojs/taro';

const useButtonPadding = () => {
  const [state, setState] = useState(0);

  useEffect(() => {
    const res = Taro.getSystemInfoSync();
    if (/iPhone X(\w)?/.test(res.model)) {
      console.log('is iphone X');
      setState(34);
    }
  }, []);

  return state;
};

export default useButtonPadding;
