Skip to content

Commit

Permalink
Merge pull request #1634 from woowacourse/fix/ui
Browse files Browse the repository at this point in the history
UI 개편
  • Loading branch information
gracefulBrown authored Dec 26, 2024
2 parents 19fb315 + 899af12 commit da3a959
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class CommentService {
public Long insertComment(CommentSaveRequest request) {
Member findMember = memberRepository.findById(request.getMemberId())
.orElseThrow(() -> new BadRequestException(MEMBER_NOT_FOUND));
validateMemberIsCrew(findMember);
// validateMemberIsCrew(findMember);
Studylog findStudylog = studylogRepository.findById(request.getStudylogId())
.orElseThrow(() -> new BadRequestException(STUDYLOG_NOT_FOUND));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,24 @@
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import wooteco.prolog.login.ui.LoginMember;
import wooteco.prolog.member.application.MemberService;
import wooteco.prolog.member.application.dto.MemberResponse;
import wooteco.prolog.session.application.MissionService;
import wooteco.prolog.session.application.SessionService;
import wooteco.prolog.session.application.dto.MissionResponse;
import wooteco.prolog.session.application.dto.SessionResponse;
import wooteco.prolog.studylog.application.dto.FilterResponse;
import wooteco.prolog.studylog.application.dto.TagResponse;

@Service
@AllArgsConstructor
public class FilterService {

private final SessionService sessionService;
private final MissionService missionService;
private final TagService tagService;
private final MemberService memberService;

public FilterResponse showAll(LoginMember loginMember) {
List<SessionResponse> sessionResponses = sessionService.findAllWithMySessionFirst(
loginMember); // my session으로 대체
List<MissionResponse> missionResponses = missionService.findAllWithMyMissionFirst(
loginMember);
List<TagResponse> tagResponses = tagService.findTagsIncludedInStudylogs();
List<MemberResponse> memberResponses = memberService.findAllOrderByNickNameAsc();
return new FilterResponse(sessionResponses, missionResponses, tagResponses,
memberResponses);
return new FilterResponse(sessionResponses, missionResponses);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import wooteco.prolog.member.application.dto.MemberResponse;
import wooteco.prolog.session.application.dto.MissionResponse;
import wooteco.prolog.session.application.dto.SessionResponse;

Expand All @@ -15,6 +14,4 @@ public class FilterResponse {

private List<SessionResponse> sessions;
private List<MissionResponse> missions;
private List<TagResponse> tags;
private List<MemberResponse> members;
}
15 changes: 8 additions & 7 deletions frontend/src/components/FilterList/FilterList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const FilterList = ({
{Object.entries(getFilteredFiltersByLevel()).map(([key, values]) => (
<div key={key}>
<button
className={"dropdown"}
onClick={() => {
setSelectedFilter(key);
setSearchKeyword('');
Expand All @@ -80,13 +81,13 @@ const FilterList = ({
</button>
{selectedFilter === key && (
<DropdownMenu css={DropdownStyle}>
<SearchBarWrapper>
<SearchBar
css={SearchBarStyle}
onChange={(value) => setSearchKeyword(value)}
value={searchKeyword}
/>
</SearchBarWrapper>
{/*<SearchBarWrapper>*/}
{/* <SearchBar*/}
{/* css={SearchBarStyle}*/}
{/* onChange={(value) => setSearchKeyword(value)}*/}
{/* value={searchKeyword}*/}
{/* />*/}
{/*</SearchBarWrapper>*/}
<SelectedFilterList
searchKeyword={searchKeyword}
filterList={values}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/FilterList/FilterList.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const FilterContainer = styled.div`
grid-template-columns: repeat(2, 1fr);
}
& button {
& button.dropdown {
display: flex;
align-items: center;
height: 100%;
Expand Down
10 changes: 1 addition & 9 deletions frontend/src/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,13 @@ import {
} from './NavBar.styles';

const navigationConfig = [
{
path: PATH.ROOT,
title: '홈',
},
{
path: PATH.STUDYLOG,
title: '학습로그',
},
{
path: PATH.ROADMAP,
title: '로드맵',
},
{
path: PATH.ARTICLE,
title: '아티클',
title: '피드',
},
] as const;

Expand Down
28 changes: 0 additions & 28 deletions frontend/src/pages/StudylogListPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,34 +134,6 @@ const StudylogListPage = (): JSX.Element => {
return (
<div css={[MainContentStyle]}>
<HeaderContainer>
<div
css={[
FlexStyle,
JustifyContentSpaceBtwStyle,
AlignItemsCenterStyle,
css`
margin-bottom: 1rem;
${MEDIA_QUERY.xs} {
flex-direction: column;
}
`,
]}
>
<h1
css={css`
font-size: 2.4rem;
`}
>
📚 학습로그
</h1>
{/* 타입스크립트 일부 적용 이슈로 인한 css 빈 string 전달 */}
<SearchBar
onSubmit={onSearch}
onChange={({ target: { value } }) => onSearchKeywordsChange(value)}
value={searchKeywords}
/>
</div>
<div
css={[
FlexStyle,
Expand Down

0 comments on commit da3a959

Please sign in to comment.