Skip to content

Commit 87e4f08

Browse files
committed
chore: app qa (#develop)
1 parent 87c5667 commit 87e4f08

File tree

15 files changed

+5322
-68
lines changed

15 files changed

+5322
-68
lines changed

services/ahhachul.com/src/components/domain/home/panel/rankHashtag/RankHashtag.component.tsx

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { NoticeGraphic } from '@/assets/graphics';
22
import { useAuth } from '@/contexts';
33
import { useFetchUserProfile } from '@/services/user';
4+
import { StackFlow } from '@/stackflow';
45

56
import * as S from './RankHashtag.styled';
67

@@ -12,6 +13,12 @@ interface Hashtag {
1213
}
1314

1415
const MOCK_RANKING: Hashtag[] = [
16+
{
17+
id: 0,
18+
title: '1호선 빌런',
19+
upRank: 4,
20+
downRank: 3,
21+
},
1522
{
1623
id: 1,
1724
title: '2호선 연착',
@@ -36,12 +43,6 @@ const MOCK_RANKING: Hashtag[] = [
3643
upRank: 18,
3744
downRank: 3,
3845
},
39-
{
40-
id: 5,
41-
title: '우크라이나',
42-
upRank: 4,
43-
downRank: 3,
44-
},
4546
];
4647

4748
const RankHashtag = () => {
@@ -61,13 +62,19 @@ const RankHashtag = () => {
6162
</S.TopRankBox>
6263
<S.RankList>
6364
{MOCK_RANKING.map((item, idx) => (
64-
<S.RankContent key={item.id}>
65-
<div>
66-
<span>{idx + 1}</span>
67-
<b>{item.title}</b>
68-
</div>
69-
<span>{'-'}</span>
70-
</S.RankContent>
65+
<StackFlow.Link
66+
key={item.id}
67+
activityName="HashtagPage"
68+
activityParams={{ keyword: item.title }}
69+
>
70+
<S.RankContent>
71+
<div>
72+
<span>{idx + 1}</span>
73+
<b>{item.title}</b>
74+
</div>
75+
<span>{'-'}</span>
76+
</S.RankContent>
77+
</StackFlow.Link>
7178
))}
7279
</S.RankList>
7380
</S.HashtagList>

services/ahhachul.com/src/components/domain/home/panel/rankHashtag/RankHashtag.styled.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { mixins } from '@/styles';
99

1010
export const Container = styled.div`
1111
${({ theme }) => css`
12+
${mixins.pagePaddingBottom};
1213
background-color: ${theme.colors.gray[20]};
1314
1415
b {

services/ahhachul.com/src/components/domain/home/panel/subwayNews/SubwayNews.component.tsx

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { subwayIconMap } from '@/constants';
22
import { useAuth } from '@/contexts';
33
import { useFetchUserProfile } from '@/services/user';
4+
import { StackFlow } from '@/stackflow';
45

56
import * as S from './SubwayNews.styled';
67

@@ -64,37 +65,43 @@ const SubwayNews = () => {
6465
<b>실시간 지하철 뉴스</b>
6566
<S.NewsList>
6667
{MOCK_NEWS.map(news => (
67-
<S.Article key={news.id}>
68-
<S.Container>
69-
<S.ContentWrapper>
70-
<S.TextContainer>
71-
<S.Title>{news.title}</S.Title>
72-
</S.TextContainer>
73-
<S.MetaContainer>
74-
<S.MetaInfo>
75-
{news.lineNumber && (
76-
<>
77-
{subwayIconMap.get(news.lineNumber)}
78-
<S.StyledDotIcon />
79-
</>
80-
)}
81-
<span>{news.timeElapsed}</span>
82-
</S.MetaInfo>
83-
</S.MetaContainer>
84-
</S.ContentWrapper>
85-
<S.ImageContainer>
86-
{news?.thumbnailUrl && (
87-
<S.PostImage
88-
width="100%"
89-
height="100%"
90-
effect="opacity"
91-
src={news.thumbnailUrl || '/placeholder.svg'}
92-
alt={`${news.title} - ${news.timeElapsed}`}
93-
/>
94-
)}
95-
</S.ImageContainer>
96-
</S.Container>
97-
</S.Article>
68+
<StackFlow.Link
69+
key={news.id}
70+
activityName="NewsDetailPage"
71+
activityParams={{ newsId: news.id }}
72+
>
73+
<S.Article>
74+
<S.Container>
75+
<S.ContentWrapper>
76+
<S.TextContainer>
77+
<S.Title>{news.title}</S.Title>
78+
</S.TextContainer>
79+
<S.MetaContainer>
80+
<S.MetaInfo>
81+
{news.lineNumber && (
82+
<>
83+
{subwayIconMap.get(news.lineNumber)}
84+
<S.StyledDotIcon />
85+
</>
86+
)}
87+
<span>{news.timeElapsed}</span>
88+
</S.MetaInfo>
89+
</S.MetaContainer>
90+
</S.ContentWrapper>
91+
<S.ImageContainer>
92+
{news?.thumbnailUrl && (
93+
<S.PostImage
94+
width="100%"
95+
height="100%"
96+
effect="opacity"
97+
src={news.thumbnailUrl || '/placeholder.svg'}
98+
alt={`${news.title} - ${news.timeElapsed}`}
99+
/>
100+
)}
101+
</S.ImageContainer>
102+
</S.Container>
103+
</S.Article>
104+
</StackFlow.Link>
98105
))}
99106
</S.NewsList>
100107
</S.SubwayNews>

services/ahhachul.com/src/components/domain/home/stations/subwayLineFilter/SubwayLineFilter.styled.ts

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,28 @@ export const filters = [
99
({ colors: { gray } }: Theme) => ({
1010
backgroundColor: gray[100],
1111
marginBottom: '32px',
12-
13-
'& > li': {
14-
display: 'flex',
15-
alignItems: 'center',
16-
justifyContent: 'center',
17-
width: 'max-content',
18-
height: '32px',
19-
borderRadius: 999999,
20-
padding: '0 8px',
21-
marginRight: '12px',
22-
overflow: 'hidden',
23-
textOverflow: 'ellipsis',
24-
whiteSpace: 'nowrap',
25-
},
2612
}),
2713
] as Interpolation<Theme>;
2814

15+
export const inherit = (line: number) => ({
16+
display: 'flex',
17+
alignItems: 'center',
18+
justifyContent: 'center',
19+
width: line < 10 ? '28px' : 'max-content',
20+
height: '28px',
21+
borderRadius: 999999,
22+
padding: '0 8px',
23+
marginRight: '12px',
24+
overflow: 'hidden',
25+
textOverflow: 'ellipsis',
26+
whiteSpace: 'nowrap',
27+
transition: 'background-color 0.4s ease-in-out',
28+
backgroundColor: subwayLineHexColors(line),
29+
});
30+
2931
export const filterBtn = (length: number) => ({
3032
color: 'white',
3133
fontSize: length >= 4 ? '12px' : '14px',
3234
fontWeight: 600,
3335
letterSpacing: '-0.2px',
3436
});
35-
36-
export const inherit = (line: number) => ({
37-
transition: 'background-color 0.4s ease-in-out',
38-
background: subwayLineHexColors(line),
39-
});

services/ahhachul.com/src/components/layout/ComposedLayout.component.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ import * as S from './ComposedLayout.styled';
77

88
interface ComposedLayoutProps extends ComponentProps<typeof AppScreen> {
99
children: ReactNode;
10-
outerChildren: ReactNode;
10+
outerChildren?: ReactNode;
11+
navigationSlot?: boolean;
1112
}
1213

13-
const ComposedLayout = ({ children, outerChildren, ...props }: ComposedLayoutProps) => {
14+
const ComposedLayout = ({
15+
children,
16+
outerChildren,
17+
navigationSlot = true,
18+
...props
19+
}: ComposedLayoutProps) => {
1420
return (
15-
<S.ComposedLayout>
21+
<S.ComposedLayout data-vaul-drawer-wrapper="true">
1622
{outerChildren}
17-
<LayoutComponent.Base navigationSlot {...props}>
23+
<LayoutComponent.Base navigationSlot={navigationSlot} {...props}>
1824
{children}
1925
</LayoutComponent.Base>
2026
</S.ComposedLayout>

services/ahhachul.com/src/constants/filter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ export const APP_UNIQUE_FILTER_ID_LIST: Record<AppUniqueFilterId, AppUniqueFilte
44
CommunityPage: 'CommunityPage',
55
LostFoundPage: 'LostFoundPage',
66
ComplaintPage: 'ComplaintPage',
7+
HashtagPage: 'HashtagPage',
78
} as const;

services/ahhachul.com/src/constants/path.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ export const PATH = {
6666
edit: '/comments/:commentId/edit',
6767
reply: '/comments/:commentId/reply',
6868
},
69+
70+
/** 뉴스 */
71+
news: {
72+
detail: '/news/:newsId',
73+
},
74+
75+
/** 해시태그 */
76+
hashtag: {
77+
home: '/hashtag',
78+
},
6979
} as const;
7080

7181
export const MAIN_PATHS: KeyOf<TypeActivities>[] = [
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as HashtagPage } from './page';
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import React, { useReducer } from 'react';
2+
3+
import styled from '@emotion/styled';
4+
import { useActivity } from '@stackflow/react';
5+
6+
import { HeaderComponent, LayoutComponent, UiComponent } from '@/components';
7+
import { CommunityType, SubwayLineFilterOptions } from '@/types';
8+
9+
const SearchedListSkeleton = React.lazy(
10+
() => import('@/components/domain/community/searchResults/skeleton/SearchedList.skeleton'),
11+
);
12+
const SearchedList = React.lazy(
13+
() => import('@/components/domain/community/searchResults/searchedList/SearchedList.component'),
14+
);
15+
16+
const HashtagPage = ({ params: { keyword } }: any) => {
17+
const { isActive } = useActivity();
18+
const [isScale, toggleScale] = useReducer(scale => !scale, false);
19+
20+
return (
21+
<LayoutComponent.Composed
22+
navigationSlot={false}
23+
appBar={{
24+
renderLeft: HeaderComponent.HeaderBrand,
25+
renderRight: HeaderComponent.HeaderActions,
26+
}}
27+
outerChildren={
28+
<>
29+
<Motion isScale />
30+
<FilterGroup isScale isActive={isActive}>
31+
<UiComponent.SearchInput uniqueId="HashtagPage" toggleScale={toggleScale} />
32+
</FilterGroup>
33+
</>
34+
}
35+
>
36+
<UiComponent.SuspenseQueryBoundary
37+
keys={[keyword]}
38+
errorFallback={<div />}
39+
suspenseFallback={<SearchedListSkeleton isScale={isScale} />}
40+
>
41+
<SearchedList
42+
keyword={keyword}
43+
filters={{
44+
communityType: CommunityType.FREE,
45+
subwayLineId: SubwayLineFilterOptions.ALL_LINES,
46+
}}
47+
isScale
48+
/>
49+
</UiComponent.SuspenseQueryBoundary>
50+
</LayoutComponent.Composed>
51+
);
52+
};
53+
54+
interface MotionProps {
55+
isScale: boolean;
56+
}
57+
58+
const Motion = styled.div<MotionProps>`
59+
position: fixed;
60+
top: 0;
61+
left: 0;
62+
width: 100%;
63+
height: 58px;
64+
z-index: 40;
65+
background-color: white;
66+
transition: background-color 0.15s ease;
67+
`;
68+
69+
interface FilterGroupProps {
70+
isScale: boolean;
71+
isActive: boolean;
72+
}
73+
74+
const FilterGroup = styled.div<FilterGroupProps>`
75+
position: fixed;
76+
top: 58px;
77+
left: 0;
78+
flex-direction: column;
79+
width: 100%;
80+
gap: 9px;
81+
transform: translateY(-42px);
82+
transition: all 0.4s ease;
83+
border-bottom: 1px solid ${({ theme }) => theme.colors.gray[20]};
84+
background-color: ${({ theme }) => theme.colors.white};
85+
padding-bottom: 16px;
86+
z-index: 50;
87+
display: ${({ isActive }) => (isActive ? 'flex' : 'none')};
88+
`;
89+
90+
export default HashtagPage;

services/ahhachul.com/src/pages/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { EditCommentPage, NewCommentReplyPage } from './comment';
2+
import { HashtagPage } from './hashtag';
3+
import { NewsDetailPage } from './news';
24
import { NotificationPage, NotificationSettingPage } from './notification';
35
import { TalkPage, TalkDetailPage, TalkSettingPage } from './talk';
46

@@ -10,6 +12,8 @@ export const SharingPages = {
1012
NotificationSettingPage,
1113
EditCommentPage,
1214
NewCommentReplyPage,
15+
NewsDetailPage,
16+
HashtagPage,
1317
} as const;
1418

1519
export * as MyPages from './my';

0 commit comments

Comments
 (0)