Skip to content
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
15 changes: 15 additions & 0 deletions src/components/font/message-font.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const messageFontFamily = Object.freeze({
"Noto Sans": "Noto Sans",
"Pretendard": "Pretendard",
"λ‚˜λˆ”λͺ…μ‘°": "Nanum Myeongjo",
"λ‚˜λˆ”μ†κΈ€μ”¨ μ†νŽΈμ§€μ²΄": "NanumPenScript"
});

const fontOptions = Object.freeze([
{ title: "Noto Sans", fontFamily: "Noto Sans" },
{ title: "Pretendard", fontFamily: "Pretendard" },
{ title: "λ‚˜λˆ”λͺ…μ‘°", fontFamily: "Nanum Myeongjo" },
{ title: "λ‚˜λˆ”μ†κΈ€μ”¨ μ†νŽΈμ§€μ²΄", fontFamily: "NanumPenScript" },
]);

export { fontOptions, messageFontFamily };
4 changes: 3 additions & 1 deletion src/features/message/components/message-card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import deleteImage from "../../../assets/ic-trash.svg";
import { OutlinedButton } from "../../../components/button/button";
import BUTTON_SIZE from "../../../components/button/button-size";
import Colors from "../../../components/color/colors";
import { messageFontFamily } from "../../../components/font/message-font";
import { formatDate } from "../../../utils/formatter";
import { media } from "../../../utils/media";
import MessageCardBase from "./message-card-base";
Expand All @@ -18,6 +19,7 @@ const Header = styled.header`

const Content = styled.div`
margin: 16px 0;
font-family: ${({ $fontFamily }) => $fontFamily};
font-size: 18px;
font-weight: 400;
line-height: 28px;
Expand Down Expand Up @@ -79,7 +81,7 @@ function MessageCard({ isEditing, index, message, onClick, onDelete }) {
/>
)}
</Header>
<Content>{message.content}</Content>
<Content $fontFamily={messageFontFamily[message.font]}>{message.content}</Content>
<CreatedDate>{formatDate(message.createdAt, ".")}</CreatedDate>
</StyledMessageCard>
</MessageCardBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function RollingPaperHeader({
profiles={messages.map((message) => message.profileImageURL)}
/>
)}
<ReceivedReactions reactions={reactions} />
{reactions.length > 0 && <ReceivedReactions reactions={reactions} />}
</DividedContainer>
<DividedContainer layout="compact">
{isEditing || (
Expand Down
6 changes: 3 additions & 3 deletions src/pages/404-page.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useEffect } from "react";
import { useEffect } from "react";
import { useNavigate } from "react-router";
import { PrimaryButton } from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";
import styled from "styled-components";
import CrushedPaperPlane from "../assets/ic-paperairplane.svg";
import logoImage from "../assets/logo.svg";
import { PrimaryButton } from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";
import { media } from "../utils/media";

const TopContainer = styled.article`
Expand Down
9 changes: 0 additions & 9 deletions src/pages/create-post-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,6 @@ function CreatePostPage() {
}
};

const handleBackgroundSelect = (e) => {
let typeSelect = e.target.textContent;

if (typeSelect === "컬러" || typeSelect === "이미지") {
setBackgroundType(typeSelect);
setSelected(0);
}
};

const handleCreate = async () => {
if (!trimmed) {
setNameError("이름을 μž…λ ₯ν•΄ μ£Όμ„Έμš”"); // 이거 μ•ˆμ „μž₯치둜 ν•„μš”ν• κΉŒμš”?
Expand Down
8 changes: 7 additions & 1 deletion src/pages/main-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import emojiImg from "../assets/ld-emoji.png";
import cardImg1 from "../assets/ld-img01.png";
import cardImg2 from "../assets/ld-img02.png";
import cardImg3 from "../assets/ld-img03.png";
import { PrimaryButton } from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";

const Content = styled.div`
width: 100%;
Expand Down Expand Up @@ -115,6 +117,10 @@ const PointBadge = styled.div`
width: fit-content;
`;

const MoveButton = styled(PrimaryButton)`
width: 280px;
`;

function MainPage() {
return (
<Content>
Expand Down Expand Up @@ -158,7 +164,7 @@ function MainPage() {
}}
>
<Link to="/list">
<button className="cta-button">ꡬ경해 보기</button>
<MoveButton size={BUTTON_SIZE.large} title="ꡬ경해 보기" />
</Link>
</div>
</Content>
Expand Down
1 change: 1 addition & 0 deletions src/pages/messages-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const BackgroundColor = styled.div`
`;

const BackgroundImage = styled.div`
height: 100%;
${({ $backgroundImageUrl }) =>
$backgroundImageUrl
? `
Expand Down
20 changes: 7 additions & 13 deletions src/pages/send-message-page.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { useState } from "react";
import TextField from "../components/text-field/text-field";
import TEXT_FIELD_TYPE from "../components/text-field/text-field-type";
import Colors from "../components/color/colors";
import { useNavigate, useParams } from "react-router";
import styled from "styled-components";
import { apiClient } from "../api/client";
import Avatar from "../components/avatar/avatar";
import AVATAR_SIZE from "../components/avatar/avatar-size";
import BUTTON_SIZE from "../components/button/button-size";
import { useNavigate, useParams } from "react-router";
import { PrimaryButton } from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";
import Colors from "../components/color/colors";
import { fontOptions } from "../components/font/message-font";
import TextEditor from "../components/text-editor/text-editor";
import TextField from "../components/text-field/text-field";
import TEXT_FIELD_TYPE from "../components/text-field/text-field-type";
import { media } from "../utils/media";
import { apiClient } from "../api/client";

const SendContainer = styled.div`
display: flex;
Expand Down Expand Up @@ -175,13 +176,6 @@ function SendMessagePage() {
trimmed !== "" && content.replace(/<[^>]+>/g, "").trim() !== "";
// μ •κ·œμ‹ μœ νš¨μ„± κ²€μ‚¬λ‘œ html νƒœκ·Έ μ°ΎκΈ°("<"둜 μ‹œμž‘ν•΄μ„œ ">"둜 λλ‚˜λŠ” 문자 쀑 > λ₯Ό μ œμ™Έν•œ(^ not) λͺ¨λ“  문자 μ œμ™Έ)

const fontOptions = [
{ title: "Noto Sans", fontFamily: "Noto Sans" },
{ title: "Pretendard", fontFamily: "Pretendard" },
{ title: "λ‚˜λˆ”λͺ…μ‘°", fontFamily: "Nanum Myeongjo" },
{ title: "λ‚˜λˆ”μ†κΈ€μ”¨ μ†νŽΈμ§€μ²΄", fontFamily: "NanumPenScript" },
];

return (
<SendContainer>
<Wrapper>
Expand Down