Skip to content

Commit

Permalink
chore: linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Nov 16, 2023
1 parent f7bbc05 commit 15f28f7
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 58 deletions.
66 changes: 34 additions & 32 deletions src/app/[lng]/mypage/MypageProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ interface MypageProfileProps {
quit?: string;
}


const Account = ({ size, color }: IconProps) => {
const sizeClass = size ? size : "h-6 w-6";
const sizeClass = size ? size : 'h-6 w-6';

const colorClass = color ? `text-${color}` : "text-gray-400";
const colorClass = color ? `text-${color}` : 'text-gray-400';
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -45,34 +44,37 @@ const UnderLinedText = ({ text }: UnderLinedTextProps) => {
);
};

export default async function MypageProfile({ name, id, phone, email, logout='', quit=''}: MypageProfileProps)

{

return (
<div>
<div className="flex flex-col items-center mr-20">
<div className="text-4xl font-medium m-10">INFO</div>
<div className="flex flex-col items-center">
<Account size="300px" color="gray-400"></Account>
<h3 className="text-3xl md:text-2.8xl font-bold p-10 flex justify-center items-center">
{name}</h3>
</div>
<div className="flex flex-col items-center">
<div className="h-8 text-secondayText text-xl border-b border-gray-300 pb-10 pl-2 pr-10 w-full mb-8">
{id}
</div>
<div className="h-8 text-secondayText text-xl border-b border-gray-300 pb-10 pl-2 pr-10 w-full mb-0">
{email}
</div>
</div>
<div className="flex flex-row items-center ">
<UnderLinedText text={logout}></UnderLinedText>
<UnderLinedText text={quit}></UnderLinedText>
</div>
export default async function MypageProfile({
name,
id,
phone,
email,
logout = '',
quit = '',
}: MypageProfileProps) {
return (
<div>
<div className="flex flex-col items-center mr-20">
<div className="text-4xl font-medium m-10">INFO</div>
<div className="flex flex-col items-center">
<Account size="300px" color="gray-400"></Account>
<h3 className="text-3xl md:text-2.8xl font-bold p-10 flex justify-center items-center">
{name}
</h3>
</div>
<div className="flex flex-col items-center">
<div className="h-8 text-secondayText text-xl border-b border-gray-300 pb-10 pl-2 pr-10 w-full mb-8">
{id}
</div>
<div className="h-8 text-secondayText text-xl border-b border-gray-300 pb-10 pl-2 pr-10 w-full mb-0">
{email}
</div>
</div>
<div className="flex flex-row items-center ">
<UnderLinedText text={logout}></UnderLinedText>
<UnderLinedText text={quit}></UnderLinedText>
</div>
</div>
);
};


</div>
);
}
17 changes: 8 additions & 9 deletions src/app/[lng]/mypage/MypageSeperate.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
const MypageSeperate = () => {
return (
<div className="pl-40 pt-40 m-20">
<div className="h-full absolute top-0 border-l-2 border-secondayText-200 m-100 bottom-0 right-0 w-1 shadow-xl bg-white">
</div>
</div>
);
};

export default MypageSeperate;
return (
<div className="pl-40 pt-40 m-20">
<div className="h-full absolute top-0 border-l-2 border-secondayText-200 m-100 bottom-0 right-0 w-1 shadow-xl bg-white"></div>
</div>
);
};

export default MypageSeperate;
36 changes: 19 additions & 17 deletions src/app/[lng]/mypage/MypageTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import LazyCat from "@/assets/lazy-cat.svg";
import dayjs from "dayjs";
import dayjs from 'dayjs';

import LazyCat from '@/assets/lazy-cat.svg';

// interface Tag {
// id: number;
Expand Down Expand Up @@ -35,24 +36,23 @@ interface UnderLinedTextProps {

const UnderLinedText = ({ text }: UnderLinedTextProps) => {
return (
<div className="m-5 border-b border-gray-200 w-50 text-white">
{text}
</div>
<div className="m-5 border-b border-gray-200 w-50 text-white">{text}</div>
);
};

const MypageTable = ({
title, articles, link, noArticle, totalList }: MypageTableProps,
) => {

const MypageTable = ({
title,
articles,
link,
noArticle,
totalList,
}: MypageTableProps) => {
return (
<div className="rounded-lg shadow-md bg-white w-[550px] xl:w-[600px]">
<div className="w-full border border-white border-collapse border-spacing-0 rounded-lg">
<div className="m-0 flex flex-row w-full border border-collapse border-spacing-0 rounded-tl-lg rounded-tr-lg bg-primary">
<div className="w-3/4 rounded-tl-10">
<div className="text-xl m-5 text-white font-bold">
{title}
</div>
<div className="text-xl m-5 text-white font-bold">{title}</div>
</div>
<div className="w-1/4 rounded-tr-10 text-right">
<div className="flex items-end justify-end text-s text-regular text-white h-full">
Expand All @@ -64,8 +64,8 @@ const MypageTable = ({
{articles.length > 0 &&
articles.map((articleObj, index) => {
const isLastRow = index === articles.length - 1;
const borderBottomRadius = isLastRow ? "10px" : "0px";
const underLine = isLastRow ? "" : "border-b border-gray-300";
const borderBottomRadius = isLastRow ? '10px' : '0px';
const underLine = isLastRow ? '' : 'border-b border-gray-300';
return (
<div
key={index}
Expand All @@ -78,9 +78,11 @@ const MypageTable = ({
{articleObj.title}
</div>
</div>
<div className={`items-end justify-end rounded-br-${borderBottomRadius}`}>
<div
className={`items-end justify-end rounded-br-${borderBottomRadius}`}
>
<div className="text-regular m-5 text-secondayText">
{dayjs(articleObj.createdAt).format("YYYY-MM-DD")}
{dayjs(articleObj.createdAt).format('YYYY-MM-DD')}
</div>
</div>
</div>
Expand All @@ -99,4 +101,4 @@ const MypageTable = ({
);
};

export default MypageTable;
export default MypageTable;

0 comments on commit 15f28f7

Please sign in to comment.