Skip to content

Commit 6c75c92

Browse files
committed
fix: comment unused logic
1 parent 1fde47e commit 6c75c92

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

src/containers/post/PostViewer.tsx

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -253,57 +253,57 @@ const PostViewer: React.FC<PostViewerProps> = ({
253253
}
254254
}, [customAd, shouldShowBanner, shouldShowFooterBanner]);
255255

256-
const category = useMemo(() => {
257-
const frontendKeywords = [
258-
'프런트엔드',
259-
'리액트',
260-
'vue',
261-
'react',
262-
'next',
263-
'프론트엔드',
264-
];
265-
const backendKeywords = ['백엔드', '서버', '데이터베이스', 'db'];
266-
const aiKeywords = ['인공지능', '머신러닝', '딥러닝', 'nlp', 'llm'];
267-
const mobileKeywords = [
268-
'안드로이드',
269-
'ios',
270-
'react native',
271-
'플러터',
272-
'flutter',
273-
'swift',
274-
'xcode',
275-
];
276-
const pythonKeywords = ['파이썬', 'python'];
277-
const nodeKeywords = ['노드', 'node', 'express', 'koa', 'nest'];
278-
279-
if (!data?.post) return null;
280-
const { post } = data;
281-
const merged = post.title
282-
.concat(post.tags.join(','))
283-
.concat(post.body)
284-
.toLowerCase();
285-
if (
286-
aiKeywords.some((keyword) => {
287-
const value = merged.includes(keyword);
288-
if (value) {
289-
// console.log(merged);
290-
// console.log(keyword);
291-
}
292-
return value;
293-
})
294-
)
295-
return 'ai';
296-
if (frontendKeywords.some((keyword) => merged.includes(keyword)))
297-
return 'frontend';
298-
if (mobileKeywords.some((keyword) => merged.includes(keyword)))
299-
return 'mobile';
300-
if (pythonKeywords.some((keyword) => merged.includes(keyword)))
301-
return 'python';
302-
if (backendKeywords.some((keyword) => merged.includes(keyword)))
303-
return 'backend';
304-
if (nodeKeywords.some((keyword) => merged.includes(keyword))) return 'node';
305-
return null;
306-
}, [data]);
256+
// const category = useMemo(() => {
257+
// const frontendKeywords = [
258+
// '프런트엔드',
259+
// '리액트',
260+
// 'vue',
261+
// 'react',
262+
// 'next',
263+
// '프론트엔드',
264+
// ];
265+
// const backendKeywords = ['백엔드', '서버', '데이터베이스', 'db'];
266+
// const aiKeywords = ['인공지능', '머신러닝', '딥러닝', 'nlp', 'llm'];
267+
// const mobileKeywords = [
268+
// '안드로이드',
269+
// 'ios',
270+
// 'react native',
271+
// '플러터',
272+
// 'flutter',
273+
// 'swift',
274+
// 'xcode',
275+
// ];
276+
// const pythonKeywords = ['파이썬', 'python'];
277+
// const nodeKeywords = ['노드', 'node', 'express', 'koa', 'nest'];
278+
279+
// if (!data?.post) return null;
280+
// const { post } = data;
281+
// const merged = post.title
282+
// .concat(post.tags.join(','))
283+
// .concat(post.body)
284+
// .toLowerCase();
285+
// if (
286+
// aiKeywords.some((keyword) => {
287+
// const value = merged.includes(keyword);
288+
// if (value) {
289+
// // console.log(merged);
290+
// // console.log(keyword);
291+
// }
292+
// return value;
293+
// })
294+
// )
295+
// return 'ai';
296+
// if (frontendKeywords.some((keyword) => merged.includes(keyword)))
297+
// return 'frontend';
298+
// if (mobileKeywords.some((keyword) => merged.includes(keyword)))
299+
// return 'mobile';
300+
// if (pythonKeywords.some((keyword) => merged.includes(keyword)))
301+
// return 'python';
302+
// if (backendKeywords.some((keyword) => merged.includes(keyword)))
303+
// return 'backend';
304+
// if (nodeKeywords.some((keyword) => merged.includes(keyword))) return 'node';
305+
// return null;
306+
// }, [data]);
307307

308308
const onRemove = async () => {
309309
if (!data || !data.post) return;

0 commit comments

Comments
 (0)