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
25 changes: 11 additions & 14 deletions src/app/independent/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const IndependentLetterPage = () => {
<Letter
showType="receive"
key={key}
contentType="all"
id={letterId}
templateType={letterData.templateType}
name={letterData.senderName}
Expand Down Expand Up @@ -236,20 +237,15 @@ const LetterContainer = styled.div`
}

@media (max-height: 780px) {
max-width: 280px;
min-height: 320px;
max-height: 320px;
}

@media (max-height: 700px) {
min-height: 300px;
max-height: 300px;
max-width: 300px;
min-height: 330px;
max-height: 330px;
}

@media (max-height: 680px) {
max-width: 250px;
min-height: 280px;
max-height: 280px;
max-width: 300px;
min-height: 330px;
max-height: 330px;
}

@media (max-height: 580px) {
Expand All @@ -259,9 +255,9 @@ const LetterContainer = styled.div`
}

@media (max-height: 550px) {
max-width: 220px;
min-height: 220px;
max-height: 220px;
max-width: 250px;
min-height: 250px;
max-height: 250px;
}
`;

Expand Down Expand Up @@ -347,6 +343,7 @@ const PaginationWrapper = styled.div`
${(props) => props.theme.fonts.body07};
color: ${(props) => props.theme.colors.gray500};
gap: 24px;
margin-bottom: 120px;

@media (max-height: 730px) {
padding: 20px 4px;
Expand Down
28 changes: 11 additions & 17 deletions src/app/letter/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const LetterPage = () => {
<Letter
showType="receive"
key={key}
contentType="all"
pageType="space"
id={letterId}
templateType={letterData.templateType}
Expand Down Expand Up @@ -186,8 +187,6 @@ const Container = styled.div`
width: 100%;
height: 100%;
color: ${theme.colors.white};
/* overflow-y: auto;
overflow-x: hidden; */
background: ${(props) => props.theme.colors.bg};
position: relative;
`;
Expand Down Expand Up @@ -262,20 +261,15 @@ const LetterContainer = styled.div`
}

@media (max-height: 780px) {
max-width: 280px;
min-height: 320px;
max-height: 320px;
}

@media (max-height: 700px) {
min-height: 300px;
max-height: 300px;
max-width: 300px;
min-height: 330px;
max-height: 330px;
}

@media (max-height: 680px) {
max-width: 250px;
min-height: 280px;
max-height: 280px;
max-width: 300px;
min-height: 330px;
max-height: 330px;
}

@media (max-height: 580px) {
Expand All @@ -285,9 +279,9 @@ const LetterContainer = styled.div`
}

@media (max-height: 550px) {
max-width: 220px;
min-height: 220px;
max-height: 220px;
max-width: 250px;
min-height: 250px;
max-height: 250px;
}
`;

Expand Down Expand Up @@ -373,7 +367,7 @@ const PaginationWrapper = styled.div`
${(props) => props.theme.fonts.body07};
color: ${(props) => props.theme.colors.gray500};
gap: 24px;
margin-bottom: 100px;
margin-bottom: 120px;

@media (max-height: 730px) {
padding: 20px 4px;
Expand Down
2 changes: 1 addition & 1 deletion src/app/letter/preview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const LetterContainer = styled.div`
}

@media (max-height: 628px) {
max-width: 280px;
max-width: 320px;
min-height: 320px;
max-height: 320px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/send/preview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const LetterContainer = styled.div`
}

@media (max-height: 628px) {
max-width: 280px;
max-width: 320px;
min-height: 320px;
max-height: 320px;
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/letter/Letter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ interface LetterProps {
padding?: string;
readOnly?: boolean;
nextLetterId?: string;
maxLineWidth?: number;
}

const Letter = (props: LetterProps) => {
Expand All @@ -50,6 +51,7 @@ const Letter = (props: LetterProps) => {
padding,
readOnly = false,
nextLetterId,
maxLineWidth,
} = props;
const router = useRouter();
const [currentPage, setCurrentPage] = useState(0);
Expand Down Expand Up @@ -86,7 +88,7 @@ const Letter = (props: LetterProps) => {

if (context) {
context.font = "16px Pretendard";
const maxWidth = contentType === "one" ? 200 : 280;
const maxWidth = contentType === "one" ? 180 : 230;
let currentLine = "";
let lines: string[] = [];

Expand Down
Loading