Skip to content

Commit

Permalink
[fix] 로그 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
zestlee1106 committed Dec 20, 2023
1 parent f3d38b2 commit 03efde3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 11 additions & 1 deletion components/ProfileCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ import { UserInfoProps } from '@/context/UserInfoProvider.tsx';
import { formatAge } from '@/utils/transform';
import UserInfoSvg from '../ImageSvg/UserInfoSvg';

function capitalizeFirstLetter(str?: string) {
// 빈 문자열 또는 null 또는 undefined인 경우에 대비
if (!str) {
return str;
}

// 첫 번째 글자만 대문자로 변경 후 나머지는 그대로 둠
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
}

interface ListItemProps {
IconComponent: React.FC<React.SVGProps<SVGSVGElement>>;
text: string;
Expand Down Expand Up @@ -121,7 +131,7 @@ export default function ProfileCard({ imageSrc, userInfo }: ProfileCard) {
<div className="flex flex-col justify-center pl-5 mt-[31px]">
<div className="text-[20px] font-semibold">{userInfo?.firstName}</div>
<div className="text-[14px] font-normal text-opacity-80">
{age} years old | {userInfo?.gender}
{age} years old | {capitalizeFirstLetter(userInfo?.gender)}
</div>
</div>
<div className="flex items-center pr-4 ml-auto">
Expand Down
2 changes: 0 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ function Home() {
// TODO : ModalLayer 로 로그인한 사용자의 Context 생성 필요
// eslint-disable-next-line consistent-return
const selectRooms = async () => {
console.log('%c 🤩🤩🤩 영우의 로그 그럼 왜: ', 'font-size: x-large; color: #bada55;', '');
try {
const data = await getRooms({
...searchParams,
Expand Down Expand Up @@ -135,7 +134,6 @@ function Home() {
// 최초 접근 시 Room 정보 조회
useEffect(() => {
(async () => {
console.log('%c 🤩🤩🤩 영우의 로그 이게 두번?: ', 'font-size: x-large; color: #bada55;', '');
const resultRooms = await selectRooms();
const resultLikedRooms = (await getLikedRooms(page))?.content;
const roomIds = [];
Expand Down

0 comments on commit 03efde3

Please sign in to comment.