Skip to content

Commit 87c5667

Browse files
committed
feat: home ui (#develop)
1 parent b976a98 commit 87c5667

File tree

40 files changed

+1033
-388
lines changed

40 files changed

+1033
-388
lines changed

services/ahhachul.com/src/App.tsx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { Global, ThemeProvider } from '@emotion/react';
1+
import React from 'react';
22

3-
import { QueryClientProvider, AuthProvider, NativeBridge } from '@/contexts';
43
import { StackFlow } from '@/stackflow';
5-
import { globalStyles, theme } from '@/styles';
64

75
if (import.meta.env.MODE === 'mock') {
86
const { worker } = await import('@/mocks');
@@ -11,16 +9,9 @@ if (import.meta.env.MODE === 'mock') {
119

1210
function App() {
1311
return (
14-
<NativeBridge>
15-
<QueryClientProvider>
16-
<Global styles={globalStyles} />
17-
<AuthProvider>
18-
<ThemeProvider theme={theme}>
19-
<StackFlow.Routes />
20-
</ThemeProvider>
21-
</AuthProvider>
22-
</QueryClientProvider>
23-
</NativeBridge>
12+
<React.Suspense fallback={null}>
13+
<StackFlow.Routes />
14+
</React.Suspense>
2415
);
2516
}
2617

services/ahhachul.com/src/apis/request/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const prefetchUserFavoriteStations = async () => {
5454
export const createUserFavoriteStations = async (stations: any) => {
5555
const response = await axiosInstance.post<ApiResponse<UserFavoriteStations>>(
5656
'/members/bookmarks/stations',
57-
{ stations },
57+
{ stations: stations.map((item: any) => ({ ...item, stationName: item.stationName + '역' })) },
5858
);
5959

6060
return response.data;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { default as ErrorGraphic } from './error.svg?react';
2+
export { default as NoticeGraphic } from './notice.svg?react';
23
export { default as EmptyGraphic } from './no-results.svg?react';
Lines changed: 15 additions & 0 deletions
Loading
Lines changed: 7 additions & 3 deletions
Loading

services/ahhachul.com/src/components/common/float/molecules/newBtn/newBtn.component.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const NewBtn = ({
2828
const action = replace ? replacePage : push;
2929
action(
3030
!checkAuth ? activityName : authService.isAuthenticated ? activityName : 'SignInPage',
31-
//@ts-expect-error: todo
3231
{},
3332
{
3433
animate: !replace,

services/ahhachul.com/src/components/common/gnb/Gnb.constant.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const GNBList: NavItem[] = [
3333
label: '유실물',
3434
},
3535
{
36-
href: ['ComplaintPage', 'ComplaintListPage'],
36+
href: ['ComplaintPage', 'ComplaintPanelPage'],
3737
icon: <ComplaintIcon />,
3838
activeIcon: <ActivatedComplaintIcon />,
3939
label: '민원',

services/ahhachul.com/src/components/common/gnb/navItem/NavItem.hook.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export const useNavItem = ({
3535
return;
3636
}
3737

38-
//@ts-expect-error: todo
3938
replace(item.href[0], {}, { animate: false });
4039
};
4140

services/ahhachul.com/src/components/domain/home/headerActions/HomeHeaderActions.styled.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { css } from '@emotion/react';
2+
import styled from '@emotion/styled';
23

34
export const container = css`
45
display: flex;
@@ -15,12 +16,16 @@ export const button = css`
1516
border-radius: 6px;
1617
padding: 8px 4px;
1718
18-
color: #272727;
19+
color: #ffffff;
1920
font-size: 18px;
2021
font-weight: bold;
2122
2223
& > span {
2324
height: 17px;
25+
26+
& > svg > g > path {
27+
fill: #ffffff;
28+
}
2429
}
2530
`;
2631

@@ -71,3 +76,18 @@ export const option = css`
7176
}
7277
}
7378
`;
79+
80+
export const Container = styled.nav`
81+
display: grid;
82+
grid-template-columns: repeat(2, 36px);
83+
align-items: center;
84+
gap: 2px;
85+
`;
86+
87+
export const navigationButtonStyle = css`
88+
width: 36px;
89+
height: 36px;
90+
display: flex;
91+
align-items: center;
92+
justify-content: center;
93+
`;
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { css } from '@emotion/react';
2+
3+
import { BellIcon, TalkIcon } from '@/assets/icons/system';
4+
import type { NavigationLink } from '@/components/common/header/HeaderActions.type';
5+
import { useAuth } from '@/contexts';
6+
import { StackFlow } from '@/stackflow';
7+
8+
import * as S from './HomeHeaderActions.styled';
9+
10+
export const NAVIGATION_LINKS: NavigationLink[] = [
11+
{
12+
icon: (
13+
<TalkIcon
14+
css={css`
15+
& > path {
16+
stroke: #ffffff;
17+
}
18+
`}
19+
/>
20+
),
21+
authenticatedRoute: 'TalkPage',
22+
unauthenticatedRoute: 'SignInPage',
23+
},
24+
{
25+
icon: (
26+
<BellIcon
27+
css={css`
28+
& > path {
29+
stroke: #ffffff;
30+
}
31+
`}
32+
/>
33+
),
34+
authenticatedRoute: 'NotificationPage',
35+
unauthenticatedRoute: 'SignInPage',
36+
},
37+
] as const;
38+
39+
const HomeHeaderRightActions = () => {
40+
const {
41+
authService: { isAuthenticated },
42+
} = useAuth();
43+
44+
return (
45+
<S.Container>
46+
{NAVIGATION_LINKS.map(({ authenticatedRoute, unauthenticatedRoute, icon }) => (
47+
<StackFlow.Link
48+
key={authenticatedRoute}
49+
activityName={isAuthenticated ? authenticatedRoute : unauthenticatedRoute}
50+
activityParams={{}}
51+
css={S.navigationButtonStyle}
52+
>
53+
{icon}
54+
</StackFlow.Link>
55+
))}
56+
</S.Container>
57+
);
58+
};
59+
60+
export default HomeHeaderRightActions;

0 commit comments

Comments
 (0)