Skip to content

Commit d97b789

Browse files
committed
Merge branch 'dev-fe' of https://github.com/boostcampwm-2024/web22-LiBoo into dev-fe
2 parents 09b44cc + ed01a97 commit d97b789

31 files changed

+899
-45
lines changed

.github/workflows/pr-slack-notify.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,24 @@ jobs:
3434
body='${{ github.event.pull_request.body }}'
3535
# Remove HTML comments and their content
3636
body=$(echo "$body" | sed 's/<!--.*-->//g')
37-
# Remove empty lines and special characters
38-
body=$(echo "$body" | grep -v '^$' | tr -d '\r')
39-
# Replace newlines with actual newlines in Slack message
40-
body=$(echo "$body" | tr '\n' ' ')
37+
# Remove image markdown
38+
body=$(echo "$body" | sed 's/<img[^>]*>//g')
39+
# Remove issue numbers
40+
body=$(echo "$body" | sed 's/#[0-9]*//g')
41+
# Clean up markdown headers and special characters
42+
body=$(echo "$body" | sed 's/##/*/g' | tr -d '\r')
43+
# Escape quotes and backslashes
44+
body="${body//\\/\\\\}"
45+
body="${body//\"/\\\"}"
46+
# Convert newlines to spaces
47+
body=$(echo "$body" | tr '\n' ' ' | sed 's/ */ /g')
4148
echo "body=${body}" >> $GITHUB_OUTPUT
4249
4350
- name: Send Slack notification
4451
uses: 8398a7/action-slack@v3
4552
with:
4653
status: custom
47-
custom_payload: >
54+
custom_payload: |
4855
{
4956
"blocks": [
5057
{
@@ -100,4 +107,4 @@ jobs:
100107
]
101108
}
102109
env:
103-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
110+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

frontend/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
"msw:init": "msw init public/"
1515
},
1616
"dependencies": {
17+
"@tanstack/react-query": "^5.59.20",
18+
"axios": "^1.7.7",
1719
"eslint-plugin-react": "^7.37.2",
20+
"hls.js": "^1.5.17",
1821
"react": "^18.3.1",
1922
"react-dom": "^18.3.1",
2023
"react-router-dom": "^6.27.0",

frontend/src/App.tsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,26 @@ import { ThemeProvider } from 'styled-components';
33

44
import { theme } from './styles/theme';
55
import { MainPage, ClientPage, HostPage } from './pages';
6+
import { QueryClientProvider } from '@tanstack/react-query';
7+
import { queryClient } from '@apis/index';
68

79
function App() {
810
return (
9-
<ThemeProvider theme={theme}>
10-
<Router>
11-
<Routes>
12-
<Route path="/" element={<MainPage />} />
11+
<QueryClientProvider client={queryClient}>
12+
<ThemeProvider theme={theme}>
13+
<Router>
14+
<Routes>
15+
<Route path="/" element={<MainPage />} />
1316

14-
<Route path="/live" element={<ClientPage />} />
15-
<Route path="/live/:id" element={<ClientPage />} />
17+
<Route path="/live" element={<ClientPage />} />
18+
<Route path="/live/:id" element={<ClientPage />} />
1619

17-
<Route path="/host" element={<HostPage />} />
18-
<Route path="/host/:id" element={<HostPage />} />
19-
</Routes>
20-
</Router>
21-
</ThemeProvider>
20+
<Route path="/host" element={<HostPage />} />
21+
<Route path="/host/:id" element={<HostPage />} />
22+
</Routes>
23+
</Router>
24+
</ThemeProvider>
25+
</QueryClientProvider>
2226
);
2327
}
2428

frontend/src/apis/index.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { QueryClient, DefaultOptions } from '@tanstack/react-query';
2+
import axios from 'axios';
3+
4+
const BASE_URL = 'http://liboo.kr';
5+
6+
export const initFetchInstance = (baseURL: string) =>
7+
axios.create({
8+
baseURL,
9+
timeout: 10000,
10+
headers: {
11+
Accept: 'application/json'
12+
}
13+
});
14+
15+
export const fetchInstance = () => initFetchInstance(BASE_URL);
16+
17+
const defaultOptions: DefaultOptions = {
18+
queries: {
19+
retry: 3,
20+
refetchOnMount: true,
21+
refetchOnReconnect: true,
22+
refetchOnWindowFocus: true
23+
}
24+
};
25+
26+
export const queryClient = new QueryClient({
27+
defaultOptions
28+
});

frontend/src/assets/icons/check.svg

Lines changed: 4 additions & 0 deletions
Loading

frontend/src/assets/icons/close.svg

Lines changed: 3 additions & 0 deletions
Loading

frontend/src/assets/icons/out.svg

Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 26 additions & 0 deletions
Loading
Lines changed: 18 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)