diff --git a/components/Group/detail/Contact/index.jsx b/components/Group/detail/Contact/index.jsx index 10c928ea..69e35242 100644 --- a/components/Group/detail/Contact/index.jsx +++ b/components/Group/detail/Contact/index.jsx @@ -1,6 +1,7 @@ import { useId, useState, forwardRef, useEffect } from 'react'; import { useRouter } from 'next/router'; import { useSelector } from 'react-redux'; +import Link from 'next/link'; import styled from '@emotion/styled'; import { Avatar, @@ -23,6 +24,19 @@ import Feedback from './Feedback'; const ROLELIST = mapToTable(ROLE); +const StyledButton = styled(Button)` + padding: 8px 36px; + line-height: 1.5; + border-radius: 20px; + color: #ffff; + background-color: #16b9b3; + font-size: 16px; + + &:disabled img { + mix-blend-mode: difference; + opacity: 0.3; + } +`; const StyledTitle = styled.label` display: block; color: var(--black-white-gray-dark, #293a3d); @@ -41,6 +55,18 @@ const StyledTextArea = styled(TextareaAutosize)` width: 100%; min-height: 128px; `; +const StyledLink = styled(Link)` + margin-top: 6px; + margin-left: 6px; + display: block; + color: black; + font-size: 12px; +`; +const StyledSpan = styled.span` + padding: 0 2px; + color: #16b9b3; + text-decoration: underline; +`; const Transition = forwardRef((props, ref) => { return ; @@ -66,6 +92,7 @@ function ContactButton({ const descriptionId = `modal-description-${id}`; const messageId = `message-${id}`; const contactId = `contact-${id}`; + const isLogin = !!me?._id; const role = ROLE.find(({ key }) => user?.roleList?.includes(key))?.label || '暫無資料'; @@ -108,21 +135,13 @@ function ContactButton({ useEffect(() => { if (!me?._id && open) router.push('/login'); - }, [me, open, router]); + }, [me?._id, open, router]); return ( - <> - + + {!isLogin && ( + + 註冊登入 + 即可聯繫主揪! + + )} setFeedback('')} /> - + ); }