|
| 1 | +import Ssury from '@/shared/assets/ssury/ssury_shaker.webp'; |
| 2 | +import Image from 'next/image'; |
| 3 | +import Send from '@/shared/assets/icons/send_36.svg'; |
| 4 | +import Link from 'next/link'; |
| 5 | +import { setPreLoginPath } from '@/domains/shared/auth/utils/setPreLoginPath'; |
| 6 | + |
| 7 | +function ChatPreview() { |
| 8 | + return ( |
| 9 | + <section className="relative flex-1 flex flex-col w-full"> |
| 10 | + <div className="page-layout max-w-1024 py-12"> |
| 11 | + <article aria-label="취향추천 챗봇 메시지" className=""> |
| 12 | + <header className="flex items-end"> |
| 13 | + <div className="relative w-15 md:w-20 h-15 md:h-20"> |
| 14 | + <Image |
| 15 | + src={Ssury} |
| 16 | + alt="쑤리아바타" |
| 17 | + width={80} |
| 18 | + height={80} |
| 19 | + className="object-cover w-15 h-15 md:w-20 md:h-20" |
| 20 | + /> |
| 21 | + </div> |
| 22 | + <p>쑤리</p> |
| 23 | + </header> |
| 24 | + |
| 25 | + {/* 메시지 그룹 */} |
| 26 | + <div className="flex flex-col gap-3 mt-3 pl-3"> |
| 27 | + <div> |
| 28 | + <div className="flex flex-col w-fit max-w-[80%] min-w-[120px] p-3 rounded-2xl rounded-tl-none bg-white text-black opacity-0 animate-fadeIn"> |
| 29 | + <div> |
| 30 | + <p className="whitespace-pre-line">취향에 맞는 칵테일, 저와 함께 찾아볼까요?</p> |
| 31 | + <Link |
| 32 | + href="/login" |
| 33 | + onNavigate={async () => { |
| 34 | + await setPreLoginPath(window.location.pathname); |
| 35 | + }} |
| 36 | + className="block p-2 mt-3 flex-center font-semibold bg-gray-light rounded-3xl hover:bg-secondary hover:shadow-[inset_0_0_6px_rgba(255,196,1,1)] active:bg-secondary active:shadow-[inset_0_0_6px_rgba(255,196,1,1)]" |
| 37 | + > |
| 38 | + 간편 로그인으로 빠르게 이용하기 |
| 39 | + </Link> |
| 40 | + </div> |
| 41 | + </div> |
| 42 | + </div> |
| 43 | + </div> |
| 44 | + </article> |
| 45 | + |
| 46 | + <div className="fixed left-0 bottom-0 w-full px-3 py-4 flex-center bg-primary"> |
| 47 | + <form onSubmit={(e) => e.preventDefault()} className="w-full max-w-[64rem]"> |
| 48 | + <div className="flex items-end gap-2"> |
| 49 | + <label htmlFor="chatInput" className="sr-only"> |
| 50 | + 질문 입력창 |
| 51 | + </label> |
| 52 | + <textarea |
| 53 | + id="chatInput" |
| 54 | + name="chatInput" |
| 55 | + placeholder={'로그인 후 이용해주세요.'} |
| 56 | + disabled |
| 57 | + className={` |
| 58 | + w-[calc(100%-3rem)] md:w-[calc(100%-3.75rem)] px-4 py-2 md:py-3.5 |
| 59 | + rounded-lg h-[40px] md:h-[52px] max-h-[160px] md:max-h-[280px] |
| 60 | + bg-white text-primary placeholder:text-gray-dark resize-none outline-none |
| 61 | + disabled:bg-gray disabled:text-gray-dark disabled:cursor-not-allowed |
| 62 | + `} |
| 63 | + /> |
| 64 | + <button |
| 65 | + type="button" |
| 66 | + aria-label="보내기" |
| 67 | + className="flex-center w-10 md:w-13 h-10 md:h-13 rounded-xl border-1 border-white bg-secondary/20" |
| 68 | + > |
| 69 | + <Send className="text-secondary" /> |
| 70 | + </button> |
| 71 | + </div> |
| 72 | + </form> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + </section> |
| 76 | + ); |
| 77 | +} |
| 78 | +export default ChatPreview; |
0 commit comments