Skip to content

Commit

Permalink
🚚 Rename: Button μ»΄ν¬λ„ŒνŠΈ λ³€μˆ˜λͺ… λ³€κ²½ 및 type 속성 μΆ”κ°€
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-paik committed Oct 27, 2023
1 parent f5c1e22 commit 919644e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 23 deletions.
6 changes: 3 additions & 3 deletions src/components/Header/TopUploadHeader.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useRecoilValue } from 'recoil';
import { isDarkModeState } from '../../atoms/StylesAtom';
import UploadButton from '../common/Button/ButtonContainer';
import Button from '../common/Button/Button';
import Container from './HeaderContainer';
import BackButton from './BackButton';
import { Section } from './TopUploadHeaderStyle';
Expand All @@ -12,8 +12,8 @@ const TopUploadHeader = ({ text, handleClick, isDisabled }) => {
<Container>
<BackButton />
<Section>
<UploadButton
type={'MS'}
<Button
size={'MS'}
text={text}
isClicked={false}
handleClick={handleClick}
Expand Down
6 changes: 2 additions & 4 deletions src/components/common/User/Follow/Follow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import { userInfoAtom } from '../../../../atoms/UserAtom';
import { isDarkModeState } from '../../../../atoms/StylesAtom';
import Button from '../../Button/ButtonContainer';
import Button from '../../Button/Button';
import basicImg from '../../../../assets/images/basic-profile-s.svg';
import basicDarkImg from '../../../../assets/images/basic-profile-s-dark.svg';
import {
Expand Down Expand Up @@ -44,15 +44,13 @@ const Follow = ({ user }) => {
</Link>
</UserContainer>
{account !== accountname && isFollow === true && (
<ButtonContainer>
<Button
type={'S'}
size={'S'}
text={'μ·¨μ†Œ'}
isClicked={isFollow}
handleClick={handleClick}
isDarkMode={isDarkMode}
/>
</ButtonContainer>
)}
{account !== accountname && isFollow === false && (
<ButtonContainer>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/FeedPage/FeedNoUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Link } from 'react-router-dom';
import { useRecoilValue } from "recoil";
import { isDarkModeState } from "../../atoms/StylesAtom";
import Button from '../../components/common/Button/ButtonContainer';
import Button from '../../components/common/Button/Button';
import HomeLogo from '../../assets/images/home-logo.svg';
import HomeDarkLogo from '../../assets/images/home-logo-dark.svg';
import { Container, Text, Image } from './FeedNoUserStyle'
Expand All @@ -14,7 +14,7 @@ const FeedNoUser = () => {
<Image src={isDarkMode ? HomeDarkLogo : HomeLogo} alt="" />
<Text>μœ μ €λ₯Ό 검색해 νŒ”λ‘œμš° ν•΄λ³΄μ„Έμš”!</Text>
<Link to={'/search'}>
<Button type={'ML'} text={'κ²€μƒ‰ν•˜κΈ°'} isDarkMode={isDarkMode} />
<Button size={'ML'} text={'κ²€μƒ‰ν•˜κΈ°'} isDarkMode={isDarkMode} />
</Link>
</Container>
);
Expand Down
6 changes: 3 additions & 3 deletions src/pages/NotFoundPage/NotFoundPage.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import { useNavigate } from 'react-router-dom';
import { useRecoilValue } from "recoil";
import Button from '../../components/common/Button/ButtonContainer';
import Button from '../../components/common/Button/Button';
import { isDarkModeState } from '../../atoms/StylesAtom';
import Icon404 from '../../assets/images/icon-404.svg';
import DarkIcon404 from '../../assets/images/icon-404-dark.svg';
import { Section, Image, ErrorMessage } from './NotFoundPageStyle';

const NotFound = ({theme}) => {
const NotFound = () => {
const isDarkMode = useRecoilValue(isDarkModeState);
const navigate = useNavigate();
const handleGoBack = () => {
Expand All @@ -18,7 +18,7 @@ const NotFound = ({theme}) => {
<Section>
<Image src={isDarkMode ? DarkIcon404 : Icon404} alt="404 둜고"/>
<ErrorMessage>νŽ˜μ΄μ§€λ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.</ErrorMessage>
<Button text={'이전 νŽ˜μ΄μ§€'} type={'ML'} handleClick={handleGoBack} />
<Button text={'이전 νŽ˜μ΄μ§€'} size={'ML'} handleClick={handleGoBack} />
</Section>
);
};
Expand Down
6 changes: 3 additions & 3 deletions src/pages/PostPage/PostPage.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import { useNavigate, useLocation } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import JoinButton from '../../components/common/Button/ButtonContainer';
import Button from '../../components/common/Button/Button';
import Map from '../../components/Map/FeedMap';
import { isDarkModeState } from '../../atoms/StylesAtom';
import { postLike, deleteLike } from '../../api/post';
Expand Down Expand Up @@ -229,8 +229,8 @@ const PostPage = ({ data, showModal }) => {
</Contents>
</Post>
{detail ? (
<JoinButton
type={'XL'}
<Button
size={'XL'}
text={postLikeState ? 'μ°Έκ°€ν•˜κΈ° μ·¨μ†Œ' : 'μ°Έκ°€ν•˜κΈ°'}
isClicked={postLikeState}
handleClick={handleToggleLike}
Expand Down
8 changes: 4 additions & 4 deletions src/pages/ProfilePage/UserInfo.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import Button from '../../components/common/Button/ButtonContainer';
import Button from '../../components/common/Button/Button';
import FollowCount from './FollowCount';
import { userInfoAtom } from '../../atoms/UserAtom';
import { isDarkModeState } from '../../atoms/StylesAtom';
Expand Down Expand Up @@ -74,7 +74,7 @@ const UserInfo = ({ data, myProfile }) => {
<ButtonSection>
{!myProfile ? (
<Button
type="M"
size="M"
text={profile.isfollow ? 'μ–ΈνŒ”λ‘œμš°' : 'νŒ”λ‘œμš°'}
handleClick={profile.isfollow ? handleUnFollow : handleFollow}
isClicked={profile.isfollow}
Expand All @@ -83,14 +83,14 @@ const UserInfo = ({ data, myProfile }) => {
) : (
<>
<Button
type="M"
size="M"
text="λŸ¬λ‹ 등둝"
isClicked={true}
isDarkMode={isDarkMode}
handleClick={handleBtnClick}
/>
<Button
type="M"
size="M"
text="ν”„λ‘œν•„ μˆ˜μ •"
isClicked={true}
isDarkMode={isDarkMode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate, useLocation } from 'react-router-dom';
import { useRecoilValue } from "recoil";
import imageCompression from 'browser-image-compression';
import Input from '../../../components/common/Input/Input';
import Button from '../../../components/common/Button/ButtonContainer';
import Button from '../../../components/common/Button/Button';
import { isDarkModeState } from '../../../atoms/StylesAtom';
import { postAccountnameDuplicate, postUserSignup, postUploadProfile } from '../../../api/auth';
import BasicProfileImg from '../../../assets/images/basic-profile-l.svg'
Expand All @@ -22,7 +22,7 @@ import {
} from './ProfileSettingPageStyle';


const ProfileSettingPage = ({theme}) => {
const ProfileSettingPage = () => {
const isDarkMode = useRecoilValue(isDarkModeState);
const URL = 'https://api.mandarin.weniv.co.kr/';
const navigate = useNavigate();
Expand All @@ -38,7 +38,8 @@ const ProfileSettingPage = ({theme}) => {
const [accountnameErrorMsg, setAccountnameErrorMsg] = useState('');
const [usernameValid, setUsernameValid] = useState(false);
const [accountnameValid, setAccountnameValid] = useState(false);
const [isComplete, setIsComplete] = useState(false);
const [isComplete, setIsComplete] = useState(false);

const formData = new FormData();
const blobToFile = (blob, filename) => {
const file = new File([blob], filename);
Expand Down Expand Up @@ -193,7 +194,7 @@ const handleProfileSignup = async (e) => {
required
/>
</TextSection>
<Button type={'L'} text={'λ“€μˆ¨λ‚ μˆ¨ μ‹œμž‘ν•˜κΈ°'} isDisabled = {!handleActivateButton()}
<Button type='submit' size={'L'} text={'λ“€μˆ¨λ‚ μˆ¨ μ‹œμž‘ν•˜κΈ°'} isDisabled = {!handleActivateButton()}
handleClick={handleProfileSignup}/>
</Form>
</Container>
Expand Down

0 comments on commit 919644e

Please sign in to comment.