Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,35 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- search console -->
<meta
name="google-site-verification"
content="PA0sJdkiE-tYd1MwR00F_FOXEEamZUdi93uXNfzBr5U"
/>

<!-- 기본 SEO -->
<title>테크포크 (TechFork) | 기업 테크 블로그 모음</title>
<title>TechFork | 기업 기술 블로그 모음</title>
<meta
name="description"
content="기업 테크 블로그를 한 곳에서 모아보고 최신 개발 트렌드를 발견하세요."
content="기업 기술 블로그를 한 곳에서 모아보고 최신 개발 트렌드를 발견하세요."
/>
<meta
name="keywords"
content="기업 기술 블로그, 기술 블로그 모음, 기업 블로그, 회사 기술 블로그, 개발 블로그 모음, 테크 블로그"
/>
<link rel="canonical" href="https://techfork-fe.vercel.app/" />

<!-- 오픈 그래프 -->
<meta property="og:site_name" content="테크포크(TechFork)" />
<meta property="og:title" content="TechFork | 기업 테크 블로그 모음" />
<meta property="og:site_name" content="TechFork" />
<meta property="og:title" content="TechFork | 기업 기술 블로그 모음" />
<meta
property="og:description"
content="네이버, 카카오, 토스 등 기업 테크 블로그를 한 곳에서 모아보는 개발자 플랫폼"
content="기업 기술 블로그를 한 곳에서 모아보고 최신 개발 트렌드를 발견하세요."
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://techfork-fe.vercel.app/" />
<meta
property="og:image"
content="https://techfork-fe.vercel.app/sub_logo.png"
/>
<!-- 아이콘 -->

<link rel="icon" type="image/png" href="/logo.png" />
<link rel="preload" as="image" href="/logo.png" fetchpriority="high" />
</head>
Expand Down
10 changes: 10 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
User-agent: *
Allow: /

Disallow: /login
Disallow: /auth/callback
Disallow: /onboarding
Disallow: /onboarding/tag
Disallow: /edit
Disallow: /interested
Disallow: /setting
Disallow: /ask

Sitemap: https://techfork-fe.vercel.app/sitemap.xml
2 changes: 0 additions & 2 deletions src/features/Login/api/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import api from "@/shared/api/api";
import { API_ENDPOINTS } from "@/shared/consts/endpoints";

export { postRefreshToken } from "@/shared/api/auth";

//로그아웃,쿠키
export const postLogout = async () => {
const { data } = await api.post(API_ENDPOINTS.auth.logout);
Expand Down
2 changes: 1 addition & 1 deletion src/features/Login/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { postLogout, postRefreshToken } from "./api/auth";
export { postLogout } from "./api/auth";
export type { OAuthProvider } from "./consts/oauth";
export { getOAuthUrl } from "./lib/getOAuthUrl";
18 changes: 5 additions & 13 deletions src/features/home/ui/PostCardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import { CardItem } from "@/shared/ui/CardItem";
import { Loading } from "@/shared/ui/Loading";
import { useCompanyStore } from "../model/useCompanyStore";
import useUserStore from "@/shared/model/useUserStore";
import type {
CardItemProps,
PostResponseDto,
} from "../api/post.types";
import type { CardItemProps, PostResponseDto } from "../api/post.types";
import { useRef, useEffect } from "react";

interface PostCardListProps {
Expand Down Expand Up @@ -51,18 +48,13 @@ const PostCardList = ({ selectedTab }: PostCardListProps) => {
(page: PostResponseDto) => page.data.posts,
) ?? []);

// console.log(posts);

return (
<>
<ul className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4">
{posts.map((item: CardItemProps) => (
<CardItem
key={item.id || item.postId}
{...item}
id={selectedTab === 1 ? item.postId : item.id}
/>
))}
{posts.map((item: CardItemProps) => {
const postId = item.postId ?? item.id;
return <CardItem key={postId} {...item} id={postId} />;
})}
</ul>
{activeQuery?.isFetchingNextPage && <Loading />}
{selectedTab !== 1 && <div ref={infiniteRef} className="h-10 w-full" />}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import api from "@/shared/api/api";
import { API_ENDPOINTS } from "@/shared/consts/endpoints";
import { useMutation } from "@tanstack/react-query";
import api from "./api";
import { API_ENDPOINTS } from "../consts/endpoints";

export const deleteAccount = async () => {
const { data } = await api.patch(API_ENDPOINTS.users.me.withdrawal);
Expand Down
2 changes: 1 addition & 1 deletion src/features/mypage/ui/LeaveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CheckOff from "@/assets/icons/check_off.svg";
import { useState } from "react";
import useUserStore from "@/shared/model/useUserStore";
import { Button } from "@/shared/ui/button/Button";
import { useDeleteAccount } from "@/shared/api/account";
import { useDeleteAccount } from "@/features/mypage/api/account";
interface LeaveModalProps {
onClose?: () => void;
}
Expand Down
17 changes: 13 additions & 4 deletions src/pages/home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,22 @@ const HomePage = () => {
<Helmet>
<title>
{isSearching
? `"${debouncedInput}" 검색 결과 | TechFork`
: `${TAB_MAP[selectedTab]} | TechFork`}
? `"${debouncedInput}" | TechFork`
: `TechFork | ${TAB_MAP[selectedTab]}`}
</title>
<meta property="og:title" content="기업 테크 블로그 모음 | TechFork" />
<meta property="og:title" content="TechFork | 기업 기술 블로그 모음" />
<meta
property="og:description"
content="네이버, 카카오, 토스 등 최신 기술 아티클을 한눈에 확인하세요."
content="기업 기술 블로그를 한 곳에서 모아보고 최신 개발 트렌드를 발견하세요."
/>
<meta
name="keywords"
content="기업 기술 블로그, 기술 블로그 모음, 기업 블로그, 회사 기술 블로그, 개발 블로그 모음, 테크 블로그"
/>
<meta property="og:type" content="website" />
<meta
property="og:image"
content="https://techfork-fe.vercel.app/sub_logo.png"
/>
</Helmet>
<div className="bg-bgPrimary py-12" onClick={() => setModal(false)}>
Expand Down
1 change: 1 addition & 0 deletions src/pages/login/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const LoginPage = () => {
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
<title>로그인 하기 | TechFork</title>
<meta property="og:title" content="로그인 | TechFork" />
<meta
Expand Down
1 change: 1 addition & 0 deletions src/pages/mypage/AskPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const AskPage = () => {
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
<title>문의하기 | TechFork</title>
<meta property="og:title" content="문의하기 | TechFork" />
<meta
Expand Down
1 change: 1 addition & 0 deletions src/pages/mypage/EditInterestPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const EditInterestPage = () => {
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
<title>관심사 수정 | TechFork</title>
<meta property="og:title" content="관심사 설정 | TechFork" />
<meta
Expand Down
1 change: 1 addition & 0 deletions src/pages/mypage/MyInterstListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const MyIntersListPage = () => {
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
<title>내 활동 | TechFork</title>
<meta property="og:title" content="내 활동 | TechFork" />
<meta
Expand Down
1 change: 1 addition & 0 deletions src/pages/mypage/SettingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const SettingPage = () => {
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
<title>계정 설정 | TechFork</title>
<meta property="og:title" content="계정 설정 | TechFork" />
<meta
Expand Down
1 change: 1 addition & 0 deletions src/pages/onboarding/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const Onboarding = () => {
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
<title>회원가입 | TechFork</title>
<meta property="og:title" content="회원가입 | TechFork" />
<meta
Expand Down
1 change: 1 addition & 0 deletions src/pages/onboarding/OnboardingTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const OnboardingTag = () => {
return (
<>
<Helmet>
<meta name="robots" content="noindex, nofollow" />
<title>회원가입 | TechFork</title>
<meta property="og:title" content="회원가입 | TechFork" />
<meta
Expand Down
10 changes: 5 additions & 5 deletions src/shared/api/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ export const postReadPosts = async (body: ReadPostType) => {

export const usePostReadPost = () => {
const queryClient = useQueryClient();
const postsReadQueryKey = [SHARED_QUERY_KEY.POSTS, SHARED_QUERY_KEY.POSTS_READ] as const;
const postsQueryKey = [SHARED_QUERY_KEY.POSTS] as const;

return useMutation({
mutationFn: (body: ReadPostType) => postReadPosts(body),
onSuccess: () => {
queryClient.invalidateQueries({
queryKey: postsReadQueryKey,
});
queryClient.invalidateQueries({ queryKey: postsQueryKey });
},
onError: err => {
console.log(err);
},
onError: err => console.log(err),
});
};
1 change: 0 additions & 1 deletion src/shared/consts/queryKeys.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const SHARED_QUERY_KEY = {
POSTS: "posts",
POSTS_READ: "read",
MY: "my",
MY_PROFILE: "profile",
MY_INTEREST: "interest",
Expand Down
Loading