Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/비밀번호 찾기 기능 오작동 문제 수정(#27) #28

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/(user)/reset-pass/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function ResetPage() {
return (
<form
ref={formRef}
className="shadow-[inset_-3px_-3px_5px_0_rgba(0,0,0,0.5)] bg-[#d8644f] max-w-[600px] w-full h-[370px] p-[10px] rounded-[5px] absolute left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%]"
className="backdrop-blur-[5px] shadow-[inset_0_0_0_2px_white] bg-transparent max-w-[600px] w-full h-[370px] p-[10px] rounded-[5px] absolute left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%]"
action={postResetPassAction}
>
<h2 className=" text-[1.5em] text-center my-[0.6em] mb-[0.8em] font-bold text-white">
Expand Down Expand Up @@ -78,7 +78,7 @@ export default function ResetPage() {
placeholder="비밀번호 재확인"
/>
</div>
<button className="shadow-[inset_-3px_-3px_5px_0_rgba(0,0,0,0.5)] hover:text-white hover:bg-[#162557] bg-white w-[130px] relative left-[50%] translate-x-[-50%] mt-[2em] text-[tomato] rounded-[5px] p-[8px] font-bold">
<button className="shadow-[inset_-3px_-3px_5px_0_rgba(0,0,0,0.5)] text-[#162557] hover:bg-[#dfe0e2] bg-white w-[130px] relative left-[50%] translate-x-[-50%] mt-[2em] rounded-[5px] p-[8px] font-bold">
전송
</button>
</form>
Expand Down
9 changes: 4 additions & 5 deletions src/mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { MAIL_SERVICE, USER, PASS } = process.env

// 메일 본문 HTML
function setHtml(path: string, userEmail:string) {
console.log(path)
const html = `
<html>
<head>
Expand All @@ -29,8 +28,7 @@ function setHtml(path: string, userEmail:string) {
color: #333;
}
p {
color: white;
background:rgba(0,0,0,0.7) ;
color: black;
padding:10px;
border-radius:10px;
font-size:15px;
Expand All @@ -40,7 +38,8 @@ function setHtml(path: string, userEmail:string) {
<body>
<div class="container">
<h1>반갑습니다. ${userEmail} 님! </h1>
<p>비밀번호 재설정 링크: <a style="color:white" href="${path}"><span>바로가기</span></a></p>
<p>해당 링크는 ${new Date().toLocaleTimeString()} 부터 7분 동안 유효합니다.</p>
<p>비밀번호 재설정 링크: <a href="${path}"><span>바로가기</span></a></p>
</div>
</body>
</html>
Expand All @@ -52,7 +51,7 @@ function setHtml(path: string, userEmail:string) {
export const mailOptions = {
from: USER,
to: '',
subject: '[Wise Sayings] 임시 패스워드 입니다.',
subject: '[Wise Sayings] 패스워드 재설정 안내 메시지 입니다..',
html: '',
}

Expand Down