Skip to content

Commit

Permalink
πŸ› Fix: ν”„λ‘œν•„ νŽ˜μ΄μ§€ 사진 및 경둜 μˆ˜μ • (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
whoisrey committed Jun 26, 2023
1 parent 7328707 commit f0e682c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/common/Modal/IconPostModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Alert from '../../common/Alert/Alert';
import LogOut from '../Alert/LogOut';
import { useNavigate } from 'react-router-dom';

const IconPostModal = ({ topText, btmText }) => {
const IconPostModal = ({ topText, btmText, accountName }) => {
const [showAlert, setShowAlert] = useState(false);
const [showLogOut, setShowLogOut] = useState(false);
const [alertMessage, setAlertMessage] = useState('');
Expand All @@ -19,7 +19,7 @@ const IconPostModal = ({ topText, btmText }) => {
setAlertDone("κ²Œμ‹œλ¬Όμ΄ μ‚­μ œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.")
} else if (topText === 'μ„€μ • 및 κ°œμΈμ •λ³΄') {
// setShowModal(false); // Close the modal
navigate("/profile/:id/editProfile")
navigate(`/profile/${accountName}/editProfile`)
} else if (topText === 'μ‹ κ³ ν•˜κΈ°') {
setAlertMessage('κ²Œμ‹œλ¬Όμ„ μ‹ κ³ ν•˜μ‹œκ² μŠ΅λ‹ˆκΉŒ?');
setShowAlert(true);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/PostPage/PostPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const PostPage = ({ data, onButtonClick, userFeedTextStyle }) => {
location.pathname === `/post/${data.author.accountname}`
);

const numberRegex = /^https:\/\/api\.mandarin\.weniv\.co\.kr\/[\w.]*$/;
const numberRegex = /^https:\/\/api\.mandarin\.weniv\.co\.kr\/[/\w.]*$/;

const handleFeedClick = (e) => {
if (location.pathname !== `/post/${data.author.accountname}`) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ProfilePage/ProfilePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const ProfilePage = () => {
<BackgroundOverlay />
<ModalContainer isOpen={isModalOpen} onAnimationEnd={handleAnimationEnd}>
<ModalContent ref={modalRef}>
<IconPostModal topText={modalTopText} btmText={modalBtmText} onClose={toggleModal} />
<IconPostModal topText={modalTopText} btmText={modalBtmText} onClose={toggleModal} accountName={accountName}/>

</ModalContent>
</ModalContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ProfilePage/UserInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const UserInfo = ({ data, myProfile }) => {
const navigate = useNavigate();
const account = useRecoilValue(accountAtom);
const [profile, setProfile] = useState(data);
const numberRegex = /^https:\/\/api\.mandarin\.weniv\.co\.kr\/[\w.]*$/;
const numberRegex = /^https:\/\/api\.mandarin\.weniv\.co\.kr\/[/\w.]*$/;

const handleFollow = async (e) => {
const followResult = await postFollow(profile.accountname);
Expand Down

0 comments on commit f0e682c

Please sign in to comment.