@@ -248,29 +100,32 @@ function UserCard({
- {!!contactList.instagram && (
+ {!!contactList['聯繫方式'] && (
-
- {contactList.instagram}
+ {contactList['聯繫方式']}
)}
+ {!!contactList.instagram && (
+ }
+ />
+ )}
{!!contactList.facebook && (
-
-
-
- {contactList.facebook}
-
-
+ }
+ />
)}
{!!contactList.line && (
diff --git a/pages/signin/index.jsx b/pages/signin/index.jsx
index f2dbf4e1..f57a16ad 100644
--- a/pages/signin/index.jsx
+++ b/pages/signin/index.jsx
@@ -63,7 +63,11 @@ function EditPage() {
const router = useRouter();
const dispatch = useDispatch();
+ const { id, token } = router.query;
+
const {
+ _id: userId,
+ token: userToken,
birthDay: userBirthDay,
gender: userGender,
roleList: userRoleList,
@@ -72,7 +76,6 @@ function EditPage() {
createdDate,
updatedDate,
} = useSelector((state) => state?.user);
- const { id } = router.query;
const [isSubscribeEmail, setIsSubscribeEmail] = useState(false);
const [birthDay, setBirthDay] = useState(dayjs());
@@ -80,14 +83,17 @@ function EditPage() {
const [roleList, setRoleList] = useState([]);
const fetchUser = async () => {
- dispatch(fetchUserById(id));
+ if (!userId) {
+ dispatch(fetchUserById(id, token));
+ }
+ router.push(`/signin?id=${id}`);
};
useEffect(() => {
- if (id) {
+ if (id || token) {
fetchUser();
}
- }, [id]);
+ }, [id, token]);
useEffect(() => {
setBirthDay(userBirthDay ? dayjs(userBirthDay) : dayjs());
diff --git a/shared/components/Navigation_v2/MainNav/Hamberger/MenuList.jsx b/shared/components/Navigation_v2/MainNav/Hamberger/MenuList.jsx
index 604743f7..2b8c7138 100644
--- a/shared/components/Navigation_v2/MainNav/Hamberger/MenuList.jsx
+++ b/shared/components/Navigation_v2/MainNav/Hamberger/MenuList.jsx
@@ -15,7 +15,7 @@ const MenuWrapper = styled.div`
flex-direction: column;
background: white;
transition: height 0.3s ease;
- padding-bottom: ${(props) => (props.open ? '160px' : 0)};
+ padding-bottom: ${(props) => (props.open ? '180px' : 0)};
z-index: 100;
overflow: auto;
`;