Skip to content

Commit

Permalink
Merge : master โ† release-1.2.10 (#127)
Browse files Browse the repository at this point in the history
Merge : ์„œ๋น„์Šค ๋ฒ„์ „ 1.2.10 ์—…๋ฐ์ดํŠธ
  • Loading branch information
JeongHwan-dev authored Apr 5, 2022
2 parents 9ee7f05 + e45858c commit 6f82f3d
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 68 deletions.
43 changes: 22 additions & 21 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssafy-mate_front-end",
"version": "1.2.9",
"version": "1.2.10",
"private": true,
"dependencies": {
"@emotion/react": "^11.7.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/account/FindUserIdCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ const Input = styled.input`
&:hover {
border: 1px solid #3396f4;
box-shadow: inset 0 0 0 1px#3396f4;
box-shadow: inset 0 0 0 1px #3396f4;
}
&:focus {
border: 1px solid #3396f4;
Expand Down
8 changes: 4 additions & 4 deletions src/components/common/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Footer: React.FC<FooterProps> = ({ offMarginTop }) => {
<MenuList>
<MenuItem>
<PageOuterLink
href="https://github.com/ssafy-mate/ssafy-mate_service"
href="https://github.com/ssafy-mate/ssafy-mate_front-end"
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -45,7 +45,7 @@ const Footer: React.FC<FooterProps> = ({ offMarginTop }) => {
</MenuItem>
<MenuItem>
<PageOuterLink
href="https://github.com/ssafy-mate/ssafy-mate_service"
href="https://github.com/ssafy-mate/ssafy-mate_front-end"
target="_blank"
rel="noopener noreferrer"
>
Expand Down Expand Up @@ -81,7 +81,7 @@ const Footer: React.FC<FooterProps> = ({ offMarginTop }) => {
</SubMenuItem>
<SubMenuItem>
<PageOuterLink
href="https://github.com/ssafy-mate/ssafy-mate_service"
href="https://github.com/ssafy-mate/ssafy-mate_front-end"
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -91,7 +91,7 @@ const Footer: React.FC<FooterProps> = ({ offMarginTop }) => {
</SubMenuList>
<SnsList>
<SnsItem
href="https://github.com/ssafy-mate/ssafy-mate_service"
href="https://github.com/ssafy-mate/ssafy-mate_front-end"
target="_blank"
rel="noopener noreferrer"
>
Expand Down
10 changes: 3 additions & 7 deletions src/components/home/common/ToTopButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ const ToTopButton: React.FC = () => {
const toggleVisible = () => {
const scrolled = document.documentElement.scrollTop;

if (scrolled > 300) {
setIsVisible(true);
} else if (scrolled <= 300) {
setIsVisible(false);
}
scrolled > 300 ? setIsVisible(true) : setIsVisible(false);
};

const scrollToTop = () => {
const handleArrowButtonClick = () => {
window.scrollTo({
top: 0,
behavior: 'smooth',
Expand All @@ -31,7 +27,7 @@ const ToTopButton: React.FC = () => {
window.addEventListener('scroll', toggleVisible);

return (
<Button onClick={scrollToTop} isVisible={isVisible}>
<Button onClick={handleArrowButtonClick} isVisible={isVisible}>
<ArrowIcon />
</Button>
);
Expand Down
18 changes: 10 additions & 8 deletions src/components/home/projectLinks/ProjectLinkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,29 @@ const ProjectLinkCard: React.FC<ProjectLinkCardProps> = ({
}
}, [token, projectTrack]);

const handleClickCardItem = () => {
const handleCardClick = () => {
if (token !== null) {
projectTrack ? dispatch(push(pageUrl)) : setOpenProjectTrackDialog(true);
} else {
setOpenWarningAlert(true);
}
};

const handleClose = (newSelectedProjectTrack?: ProjectTrack) => {
const handleProjectTrackDialogClose = (
newSelectedProjectTrack?: ProjectTrack,
) => {
setOpenProjectTrackDialog(false);

if (newSelectedProjectTrack !== undefined) {
setSelectedProjectTrack(newSelectedProjectTrack);
}
};

const handleClickOpenBlockDialog = () => {
const handleCardWithBlockDialogClick = () => {
token !== null ? setOpenBlockDialog(true) : setOpenWarningAlert(true);
};

const handleMouseEnterBlockDialog = () => {
const handleCardMouseEnter = () => {
import('./ProjectTrackDialog');
};

Expand All @@ -88,10 +90,10 @@ const ProjectLinkCard: React.FC<ProjectLinkCardProps> = ({
<Card
onClick={
trackOptions !== undefined
? handleClickCardItem
: handleClickOpenBlockDialog
? handleCardClick
: handleCardWithBlockDialogClick
}
onMouseEnter={handleMouseEnterBlockDialog}
onMouseEnter={handleCardMouseEnter}
css={{ backgroundColor: hexColorCode }}
>
<CardImg
Expand Down Expand Up @@ -123,7 +125,7 @@ const ProjectLinkCard: React.FC<ProjectLinkCardProps> = ({
pageUrl={pageUrl}
hexColorCode={hexColorCode}
trackOptions={trackOptions}
onClose={handleClose}
onClose={handleProjectTrackDialogClose}
/>
)}
</Suspense>
Expand Down
38 changes: 17 additions & 21 deletions src/components/home/projectLinks/ProjectTrackDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@ const ProjectTrackDialog: React.FC<ConfirmationDialogRawProps> = ({
onClose,
...other
}) => {
const [selectedProjectTrack, setSelectedProjectTrack] = useState(
selectedProjectTrackProp,
);
const [projectTrack, setProjectTrack] = useState(selectedProjectTrackProp);
const radioGroupRef = useRef<HTMLElement>(null);
const dispatch = useDispatch();

useEffect(() => {
if (!open) {
setSelectedProjectTrack(selectedProjectTrackProp);
setProjectTrack(selectedProjectTrackProp);
}
}, [selectedProjectTrackProp, open]);

Expand All @@ -82,8 +80,8 @@ const ProjectTrackDialog: React.FC<ConfirmationDialogRawProps> = ({
}
};

const handleSubmitSelectedProjectTrack = () => {
if (selectedProjectTrack === null && selectedProjectTrack === '') {
const handleDialogButtonClick = () => {
if (projectTrack === null && projectTrack === '') {
dispatch(
showSsafyMateAlert({
show: true,
Expand All @@ -97,14 +95,16 @@ const ProjectTrackDialog: React.FC<ConfirmationDialogRawProps> = ({

selectProjectTrack({
project,
projectTrack: selectedProjectTrack,
projectTrack,
});

onClose(selectedProjectTrack);
onClose(projectTrack);
};

const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
setSelectedProjectTrack((event.target as HTMLInputElement).value);
const handleProjectTrackRadioGroupChange = (
event: React.ChangeEvent<HTMLInputElement>,
) => {
setProjectTrack((event.target as HTMLInputElement).value);
};

return (
Expand All @@ -121,10 +121,10 @@ const ProjectTrackDialog: React.FC<ConfirmationDialogRawProps> = ({
<DialogContent dividers>
<RadioGroup
ref={radioGroupRef}
aria-label="ringtone"
name="ringtone"
value={selectedProjectTrack}
onChange={handleChange}
aria-label="project-track"
name="project-track"
value={projectTrack}
onChange={handleProjectTrackRadioGroupChange}
>
{trackOptions?.map((trackOption) => (
<OptionLabel
Expand All @@ -139,13 +139,9 @@ const ProjectTrackDialog: React.FC<ConfirmationDialogRawProps> = ({
</DialogContent>
<DialogActions>
<DialogButton
onClick={handleSubmitSelectedProjectTrack}
onClick={handleDialogButtonClick}
fontcolor={hexColorCode}
disabled={
selectedProjectTrack === null || selectedProjectTrack === ''
? true
: false
}
disabled={projectTrack === null || projectTrack === '' ? true : false}
>
ํ™•์ธ
</DialogButton>
Expand All @@ -155,10 +151,10 @@ const ProjectTrackDialog: React.FC<ConfirmationDialogRawProps> = ({
};

const ProjectTrackTitle = styled(DialogTitle)<ProjectTrackTitleProps>`
background-color: ${(props) => props.hexcolorcode};
font-family: 'Spoqa Han Sans Neo', 'sans-serif';
font-size: 18px;
color: #fff;
background-color: ${(props) => props.hexcolorcode};
@media (max-width: 575px) {
font-size: 16px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/signIn/SignInCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const SignInInput = styled.input`
&:hover {
border: 1px solid #3396f4;
box-shadow: inset 0 0 0 1px#3396f4;
box-shadow: inset 0 0 0 1px #3396f4;
}
&:focus {
border: 1px solid #3396f4;
Expand Down
8 changes: 4 additions & 4 deletions src/components/team/TeamEditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ const TeamEditForm: React.FC = () => {
}
};

const renderingRecruitmentOptions = (
const renderRecruitmentOptions = (
startHeadCount: number,
endHeadCount: number,
) => {
Expand Down Expand Up @@ -567,7 +567,7 @@ const TeamEditForm: React.FC = () => {
onChange={handleTotalRecruitmentChange}
required
>
{renderingRecruitmentOptions(totalHeadcount <= 5 ? 5 : 6, 6)}
{renderRecruitmentOptions(totalHeadcount <= 5 ? 5 : 6, 6)}
</Select>
{isDisplayedWarningText && totalRecruitment === 0 && (
<WarningMessage text="ํ•„์ˆ˜ ์„ ํƒ ํ•ญ๋ชฉ์ž…๋‹ˆ๋‹ค." />
Expand All @@ -592,7 +592,7 @@ const TeamEditForm: React.FC = () => {
disabled={totalRecruitment === 0}
required
>
{renderingRecruitmentOptions(
{renderRecruitmentOptions(
frontendHeadcount >= 1 ? frontendHeadcount : 1,
totalRecruitment - 1,
)}
Expand All @@ -618,7 +618,7 @@ const TeamEditForm: React.FC = () => {
disabled={totalRecruitment === 0 || frontendRecruitment === 0}
required
>
{renderingRecruitmentOptions(
{renderRecruitmentOptions(
totalRecruitment - frontendRecruitment,
totalRecruitment - frontendRecruitment,
)}
Expand Down

0 comments on commit 6f82f3d

Please sign in to comment.