Skip to content

Commit

Permalink
fix: build error 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeseon-han committed Feb 28, 2024
1 parent 74224cf commit a716811
Show file tree
Hide file tree
Showing 46 changed files with 112 additions and 407 deletions.
13 changes: 2 additions & 11 deletions src/components/atoms/GreenArrowButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,14 @@ interface GreenArrowButtonProps {
className: string;
}

const GreenArrowButton: React.FC<GreenArrowButtonProps> = ({
text,
className,
onClick,
}) => {
const GreenArrowButton: React.FC<GreenArrowButtonProps> = ({ text, className, onClick }) => {
return (
<button
onClick={onClick}
className={`flex items-center justify-center w-full bg-primary2 text-white p-18 gap-12 rounded-12 heading4-semibold ${className}`}
>
{text}
<AngleIcon
fill="#ffffff"
width={16}
height={16}
transform="rotate(180)"
/>
<AngleIcon fill="#ffffff" width={16} height={16} transform="rotate(180)" />
</button>
);
};
Expand Down
12 changes: 2 additions & 10 deletions src/components/atoms/IngredientIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,9 @@ export const AppleIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<rect width="38" height="38" rx="19" fill="#DAF7A3" />
<path
d="M8.44424 28.5893H29.5554V7.47819H8.44424V28.5893Z"
fill="url(#pattern0)"
/>
<path d="M8.44424 28.5893H29.5554V7.47819H8.44424V28.5893Z" fill="url(#pattern0)" />
<defs>
<pattern
id="pattern0"
patternContentUnits="objectBoundingBox"
width="1"
height="1"
>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlinkHref="#image0_204_3739" transform="scale(0.00625)" />
</pattern>
<image
Expand Down
9 changes: 3 additions & 6 deletions src/components/atoms/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React from 'react';

const Input: React.FC<
React.DetailedHTMLProps<
React.InputHTMLAttributes<HTMLInputElement>,
HTMLInputElement
>
> = ({ ...props }) => {
const Input: React.FC<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>> = ({
...props
}) => {
return (
<input
{...props}
Expand Down
6 changes: 1 addition & 5 deletions src/components/atoms/MiniButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ const MiniButton: React.FC<{
}, []);

return (
<button
disabled={variant === 'disable'}
onClick={onClick}
className={`px-[16px] py-[10px] rounded-[6px] ${style}`}
>
<button disabled={variant === 'disable'} onClick={onClick} className={`px-[16px] py-[10px] rounded-[6px] ${style}`}>
{label}
</button>
);
Expand Down
5 changes: 1 addition & 4 deletions src/components/atoms/RadioButtonField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ const RadioButtonField: React.FC<{
checked: boolean;
}> = ({ label, onClick, checked }) => {
return (
<button
onClick={onClick}
className="flex flex-1 w-screen px-[20px] py-[24px] justify-between"
>
<button onClick={onClick} className="flex flex-1 w-screen px-[20px] py-[24px] justify-between">
<p className="heading3-semibold">{label}</p>
<Radio checked={checked} />
</button>
Expand Down
15 changes: 2 additions & 13 deletions src/components/atoms/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,12 @@ interface SearchInputProps {
placeholder?: string;
}

const SearchInput: React.FC<SearchInputProps> = ({
searchKeyword,
onClick,
placeholder,
onChange,
className,
}) => {
const SearchInput: React.FC<SearchInputProps> = ({ searchKeyword, onClick, placeholder, onChange, className }) => {
return (
<div
className={`flex items-center justify-center w-full bg-gray1 text-white p-18 gap-12 rounded-12 heading4-semibold ${className}`}
>
<input
className="w-full bg-gray1 text"
placeholder={placeholder}
onChange={onChange}
value={searchKeyword}
/>
<input className="w-full bg-gray1 text" placeholder={placeholder} onChange={onChange} value={searchKeyword} />
<SearchIcon />
</div>
);
Expand Down
12 changes: 2 additions & 10 deletions src/components/atoms/SortButton.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import { AngleIcon } from '@/assets/icons';
import React from 'react';

const SortButton: React.FC<{ label: string; onClick: () => void }> = ({
label,
onClick,
}) => {
const SortButton: React.FC<{ label: string; onClick: () => void }> = ({ label, onClick }) => {
return (
<button onClick={onClick} className="flex justify-center items-center">
<span className="mr-[4px] text-gray5">{label}</span>
<AngleIcon
width={14}
height={14}
fill="#9299AA"
transform="rotate(270)"
/>
<AngleIcon width={14} height={14} fill="#9299AA" transform="rotate(270)" />
</button>
);
};
Expand Down
4 changes: 1 addition & 3 deletions src/components/atoms/Toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ const Toggle: React.FC<{
isToggleOn?: boolean;
onClick?: () => void;
}> = ({ isToggleOn, onClick }) => {
return (
<Switch colorScheme="primary2" isChecked={isToggleOn} onChange={onClick} />
);
return <Switch colorScheme="primary2" isChecked={isToggleOn} onChange={onClick} />;
};

export default Toggle;
7 changes: 2 additions & 5 deletions src/components/molecules/Counter.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React, { useEffect } from 'react';

import type { CountState } from '@/hooks/useCount';

const Counter: React.FC<CountState> = ({
currentCount,
handleDecreaseCount,
handleIncreaseCount,
}) => {
const Counter: React.FC<CountState> = ({ currentCount, handleDecreaseCount, handleIncreaseCount }) => {
useEffect(() => {}, [currentCount]);
return (
<div className="flex items-center h-[32px] bg-white rounded-[6px]">
Expand Down
8 changes: 2 additions & 6 deletions src/components/molecules/FridgeEnterButton.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import React from 'react';
import Link from 'next/link';
import React from 'react';

interface FridgeEnterButtonProps {
svgComponent: React.ReactNode;
text: string;
linkTo: string;
}

const FridgeEnterButton: React.FC<FridgeEnterButtonProps> = ({
svgComponent,
text,
linkTo,
}) => {
const FridgeEnterButton: React.FC<FridgeEnterButtonProps> = ({ svgComponent, text, linkTo }) => {
return (
<Link href={linkTo}>
{svgComponent}
Expand Down
13 changes: 3 additions & 10 deletions src/components/molecules/FridgeTab.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import React from 'react';
import { BorderTab } from '../atoms';
import React from 'react';

interface FridgeTabProps {
currentTabName: '냉장' | '냉동';
handleTabNameChange: (tabName: '냉장' | '냉동') => void;
}
const FridgeTab: React.FC<FridgeTabProps> = ({
currentTabName,
handleTabNameChange,
}) => {
const FridgeTab: React.FC<FridgeTabProps> = ({ currentTabName, handleTabNameChange }) => {
return (
<div className="flex w-full justify-evenly">
<BorderTab
tabName="냉장"
currentTabName={currentTabName}
handleTabNameChange={handleTabNameChange}
/>
<BorderTab tabName="냉장" currentTabName={currentTabName} handleTabNameChange={handleTabNameChange} />
<BorderTab
tabName="냉동"
currentTabName={currentTabName}
Expand Down
22 changes: 4 additions & 18 deletions src/components/molecules/FriendsFridgeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,16 @@ interface FriendsFridgeItemProps {
linkTo: string;
}

const FriendsFridgeItem: React.FC<FriendsFridgeItemProps> = ({
name,
ingredientCount,
linkTo,
}) => {
const FriendsFridgeItem: React.FC<FriendsFridgeItemProps> = ({ name, ingredientCount, linkTo }) => {
return (
<Link
href={`friend/1`}
className="w-full flex items-center justify-between"
>
<Link href={`friend/1`} className="w-full flex items-center justify-between">
<div className="flex gap-[12px]">
<div>
<Image
src={profileImg}
width={50}
height={50}
alt={`누군가의 프로필`}
/>
<Image src={profileImg} width={50} height={50} alt={`누군가의 프로필`} />
</div>
<div className="flex flex-col justify-center">
<div className="heading4-semibold text-gray7">{name}</div>
<div className="body2-medium text-gray5">
냉장고 저장 목록 {ingredientCount}
</div>
<div className="body2-medium text-gray5">냉장고 저장 목록 {ingredientCount}</div>
</div>
</div>
<Link href={`${linkTo}`}>
Expand Down
4 changes: 1 addition & 3 deletions src/components/molecules/FriendshipHeaderSettingButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from 'react';
import { SettingIcon } from '@/assets/icons';

const FriendshipHeaderSettingButton: React.FC<{ onClick: () => void }> = ({
onClick,
}) => {
const FriendshipHeaderSettingButton: React.FC<{ onClick: () => void }> = ({ onClick }) => {
return (
<button onClick={onClick}>
<SettingIcon />
Expand Down
8 changes: 2 additions & 6 deletions src/components/molecules/IngredientAddItemContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { GrayBox } from '../atoms';
import React from 'react';

interface IngredientAddItemContainerProps {
isRow: boolean;
Expand All @@ -14,11 +14,7 @@ const IngredientAddItemContainer: React.FC<IngredientAddItemContainerProps> = ({
children,
}) => {
return (
<GrayBox
className={
isRow ? 'h-[60px] flex-row justify-between items-center' : undefined
}
>
<GrayBox className={isRow ? 'h-[60px] flex-row justify-between items-center' : undefined}>
<div className="flex gap-[4px]">
{svgComponent}
<div className="heading4-semibold">{title}</div>
Expand Down
18 changes: 4 additions & 14 deletions src/components/molecules/NavWhiteBoxItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Link from 'next/link';
import { AngleIcon } from '@/assets/icons';
import Link from 'next/link';
import React from 'react';

interface NavWhiteBoxItemProps {
name: string;
Expand All @@ -9,12 +9,7 @@ interface NavWhiteBoxItemProps {
svgComponent: React.ReactNode;
}

const NavWhiteBoxItem: React.FC<NavWhiteBoxItemProps> = ({
name,
linkTo,
text,
svgComponent,
}) => {
const NavWhiteBoxItem: React.FC<NavWhiteBoxItemProps> = ({ name, linkTo, text, svgComponent }) => {
return (
<Link href={linkTo} className="w-full flex justify-between items-center">
<div className="flex items-center gap-[12px]">
Expand All @@ -23,12 +18,7 @@ const NavWhiteBoxItem: React.FC<NavWhiteBoxItemProps> = ({
{text ? (
<div className="text-gray4">{text}</div>
) : (
<AngleIcon
fill={'gray'}
width={16}
height={16}
transform="rotate(180)"
/>
<AngleIcon fill={'gray'} width={16} height={16} transform="rotate(180)" />
)}
</Link>
);
Expand Down
12 changes: 3 additions & 9 deletions src/components/molecules/NearExpirationWarnBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ interface NearExpirationWarnBoxProps {
className: string;
}

const NearExpirationWarnBox: React.FC<NearExpirationWarnBoxProps> = ({
count,
className,
}) => {
const NearExpirationWarnBox: React.FC<NearExpirationWarnBoxProps> = ({ count, className }) => {
return (
<div
className={`flex items-center gap-8.5 h-45 bg-gray8 p-12 rounded-12 ${className}`}
>
<div className={`flex items-center gap-8.5 h-45 bg-gray8 p-12 rounded-12 ${className}`}>
<NowBadge />

<div className="text-gray2 body1-regular">
소비기한이 얼마 안 남은 식자재가{' '}
<span className="text-white body1-semibold">{count}</span> 있어요!
소비기한이 얼마 안 남은 식자재가 <span className="text-white body1-semibold">{count}</span> 있어요!
</div>
</div>
);
Expand Down
10 changes: 3 additions & 7 deletions src/components/molecules/SvgAndTextBox.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import React from 'react';
import Link from 'next/link';
import { Container } from '@/components/atoms';
import Link from 'next/link';
import React from 'react';

interface SvgAndTextBoxProps {
svgComponent: React.ReactNode;
text: string;
linkTo: string;
}

const SvgAndTextBox: React.FC<SvgAndTextBoxProps> = ({
svgComponent,
text,
linkTo,
}) => {
const SvgAndTextBox: React.FC<SvgAndTextBoxProps> = ({ svgComponent, text, linkTo }) => {
return (
<Link className="w-full" href={linkTo}>
<Container className="bg-white">
Expand Down
5 changes: 1 addition & 4 deletions src/components/molecules/VerticalLabelValue.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import React from 'react';

const VerticalLabelValue: React.FC<{ label: string; value: string }> = ({
label,
value,
}) => {
const VerticalLabelValue: React.FC<{ label: string; value: string }> = ({ label, value }) => {
return (
<div className="mx-auto text-center">
<p className="mb-[8px] body1-medium text-gray5">{label}</p>
Expand Down
10 changes: 2 additions & 8 deletions src/components/organisms/BottomNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,11 @@ const BottomNavigation: React.FC = () => {
<div className="min-h-[72px]">
<div className="flex fixed h-[72px] justify-between px-[27px] bottom-0 w-full bg-white max-w-[480px] ">
{BOTTOM_TABS.map((ele) => (
<Link
key={ele.label}
href={ele.href}
className="w-[80px] text-center justify-center pt-[12px] pb-[24px]"
>
<Link key={ele.label} href={ele.href} className="w-[80px] text-center justify-center pt-[12px] pb-[24px]">
<div className="flex justify-center">
<ele.icon fill={pathname === ele.href ? '#0C5E5A' : '#CCCFD7'} />
</div>
<p
className={`mt-[4px] body2-semibold ${pathname === ele.href ? 'text-primary3' : 'text-gray3'}`}
>
<p className={`mt-[4px] body2-semibold ${pathname === ele.href ? 'text-primary3' : 'text-gray3'}`}>
{ele.label}
</p>
</Link>
Expand Down
5 changes: 1 addition & 4 deletions src/components/organisms/BulletNoticeBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ const BulletNoticeBox: React.FC<{
<DotIcon width={4} height={4} fill="#52C5A6" className="inline" />
<span className="ml-[4px] body2-semibold text-gray7">{title}</span>
</p>
<p
className="pl-[8px] body2-semibold text-gray6"
dangerouslySetInnerHTML={{ __html: content }}
/>
<p className="pl-[8px] body2-semibold text-gray6" dangerouslySetInnerHTML={{ __html: content }} />
</div>
);
};
Expand Down
Loading

0 comments on commit a716811

Please sign in to comment.