-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/ 2024-12-02 Dev to Main #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ import { signUpSchema } from '@/constants/formSchemas/authSchema'; | |
| import { useSignIn, useSignUp } from '@/queries/auth.queries'; | ||
| import { SignUpRequest } from '@/types/dto/requests/auth.request.types'; | ||
| import { zodResolver } from '@hookform/resolvers/zod'; | ||
| import Head from 'next/head'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Metadata implementation needs standardization across pages
Recommendations:
🔗 Analysis chainVerify metadata consistency across the application Let's check if these metadata changes are consistently implemented across all pages. Also applies to: 16-17, 87-102 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check metadata implementation across pages
# Expected: Find all pages with/without Head component and og meta tags
# Find all page components
echo "=== Pages with metadata ==="
rg -l "import.*Head.*from.*next/head" "src/pages"
echo -e "\n=== Pages missing og:image tag ==="
rg -L "og:image" $(rg -l "og:title" "src/pages")
echo -e "\n=== Hardcoded URLs in meta tags ==="
rg -i "content=\"https?://" "src/pages"
Length of output: 1948 |
||
| import { useRouter } from 'next/navigation'; | ||
| import { useEffect } from 'react'; | ||
| import { useForm } from 'react-hook-form'; | ||
|
|
@@ -82,64 +83,82 @@ function SignUpForm() { | |
| ]); | ||
|
|
||
| return ( | ||
| <form | ||
| className="flex w-full flex-col gap-7 font-pretendard" | ||
| onSubmit={handleSubmit(onSubmit)} | ||
| noValidate | ||
| > | ||
| <Input | ||
| type="text" | ||
| id="name-input" | ||
| label="닉네임" | ||
| placeholder="닉네임을 입력해주세요." | ||
| {...register('nickname')} | ||
| errorMessage={errors.nickname?.message} | ||
| /> | ||
| <Input | ||
| type="email" | ||
| id="email-input" | ||
| label="이메일" | ||
| placeholder="이메일을 입력해주세요." | ||
| {...register('email')} | ||
| errorMessage={errors.email?.message} | ||
| /> | ||
| <Input | ||
| type="password" | ||
| id="password-input" | ||
| label="비밀번호" | ||
| placeholder="비밀번호를 입력해주세요." | ||
| hasVisibilityButton | ||
| {...register('password')} | ||
| errorMessage={errors.password?.message} | ||
| /> | ||
| <Input | ||
| type="password" | ||
| id="password-check-input" | ||
| label="비밀번호 확인" | ||
| placeholder="비밀번호를 다시 한 번 입력해주세요." | ||
| hasVisibilityButton | ||
| {...register('passwordConfirmation')} | ||
| errorMessage={errors.passwordConfirmation?.message} | ||
| /> | ||
| {signUpError && ( | ||
| <p className="ml-2 text-md-semibold text-status-danger"> | ||
| {(signUpError as SignUpError).response?.data?.message} | ||
| </p> | ||
| )} | ||
| <Button | ||
| type="submit" | ||
| buttonStyle={ButtonStyle.Box} | ||
| textColor={TextColor.White} | ||
| textSize={TextSize.Large} | ||
| buttonWidth={ButtonWidth.Full} | ||
| buttonBackgroundColor={ButtonBackgroundColor.Green} | ||
| buttonBorderColor={ButtonBorderColor.None} | ||
| buttonPadding={ButtonPadding.Large} | ||
| disabled={isPending} | ||
| <> | ||
| <Head> | ||
| <title>회원가입 - Coworkers</title> | ||
| <meta | ||
| name="description" | ||
| content="Coworkers에 가입하여 팀 협업을 시작하세요! 쉽고 빠른 회원가입 기능을 제공합니다." | ||
| /> | ||
| <meta property="og:title" content="회원가입 - Coworkers" /> | ||
| <meta | ||
| property="og:description" | ||
| content="회원가입 후 팀과 함께 효율적인 협업을 시작하세요." | ||
| /> | ||
| <meta | ||
| property="og:url" | ||
| content="https://coworkers-colla.netlify.app/signup" | ||
| /> | ||
| </Head> | ||
| <form | ||
| className="flex w-full flex-col gap-7 font-pretendard" | ||
| onSubmit={handleSubmit(onSubmit)} | ||
| noValidate | ||
| > | ||
| 회원가입 | ||
| </Button> | ||
| </form> | ||
| <Input | ||
| type="text" | ||
| id="name-input" | ||
| label="닉네임" | ||
| placeholder="닉네임을 입력해주세요." | ||
| {...register('nickname')} | ||
| errorMessage={errors.nickname?.message} | ||
| /> | ||
| <Input | ||
| type="email" | ||
| id="email-input" | ||
| label="이메일" | ||
| placeholder="이메일을 입력해주세요." | ||
| {...register('email')} | ||
| errorMessage={errors.email?.message} | ||
| /> | ||
| <Input | ||
| type="password" | ||
| id="password-input" | ||
| label="비밀번호" | ||
| placeholder="비밀번호를 입력해주세요." | ||
| hasVisibilityButton | ||
| {...register('password')} | ||
| errorMessage={errors.password?.message} | ||
| /> | ||
| <Input | ||
| type="password" | ||
| id="password-check-input" | ||
| label="비밀번호 확인" | ||
| placeholder="비밀번호를 다시 한 번 입력해주세요." | ||
| hasVisibilityButton | ||
| {...register('passwordConfirmation')} | ||
| errorMessage={errors.passwordConfirmation?.message} | ||
| /> | ||
| {signUpError && ( | ||
| <p className="ml-2 text-md-semibold text-status-danger"> | ||
| {(signUpError as SignUpError).response?.data?.message} | ||
| </p> | ||
| )} | ||
| <Button | ||
| type="submit" | ||
| buttonStyle={ButtonStyle.Box} | ||
| textColor={TextColor.White} | ||
| textSize={TextSize.Large} | ||
| buttonWidth={ButtonWidth.Full} | ||
| buttonBackgroundColor={ButtonBackgroundColor.Green} | ||
| buttonBorderColor={ButtonBorderColor.None} | ||
| buttonPadding={ButtonPadding.Large} | ||
| disabled={isPending} | ||
| > | ||
| 회원가입 | ||
| </Button> | ||
| </form> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 코드 패치는 Next.js에서 회원가입 폼을 구현하는 코드입니다. 코드를 살펴보면 다음과 같은 점에 대한 개선 제안 및 버그 리스크가 있습니다:
총평하면, 기본적으로 폼 구현에 필요한 기능이 구현되어 있지만, 보안 및 유지보수 측면에서 개선이 필요한 부분이 있습니다. 추가적인 테스트를 통해 정확성을 보장할 수 있도록 개선하는 것이 좋을 것으로 판단됩니다. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import { cn } from '@/utils/tailwind/cn'; | ||
| import Head from 'next/head'; | ||
| import { ReactNode } from 'react'; | ||
| import { Toaster } from '../common/Toast/Toaster'; | ||
| import { useCloseAllDrop } from './lib/use-close-all-drop'; | ||
|
|
@@ -9,6 +10,14 @@ export default function RootLayout({ children }: { children: ReactNode }) { | |
| return ( | ||
| <> | ||
| <Header /> | ||
| <Head> | ||
| <meta property="og:type" content="website" /> | ||
| <meta | ||
| property="og:url" | ||
| content="https://coworkers-colla.netlify.app/" | ||
| /> | ||
| <meta property="og:image" content="/images/Homepage_img.png" /> | ||
| </Head> | ||
|
Comment on lines
+13
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification 🛠️ Refactor suggestion Open Graph image exists, but essential meta tags are still missing The image path
🔗 Analysis chainAdd missing essential Open Graph meta tags and verify image path The Open Graph implementation needs enhancement:
Add the missing meta tags: <Head>
<meta property="og:type" content="website" />
<meta
property="og:url"
content="https://coworkers-colla.netlify.app/"
/>
+ <meta property="og:title" content="Coworkers - Collaborate Better" />
+ <meta property="og:description" content="팀원들과 자유롭게 협업하세요" />
<meta property="og:image" content="/images/Homepage_img.png" />
</Head>Let's verify the image path exists: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check if the Open Graph image exists in the public directory
fd "Homepage_img.png" public/images/
Length of output: 67 |
||
| <Aside /> | ||
| <div className="h-16" /> | ||
| <main | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 코드 조각은 RootLayout 컴포넌트 내부에 Head 컴포넌트를 추가하여 다양한 메타 태그를 설정하고 있습니다. 이는 페이지의 SEO(검색 엔진 최적화) 및 소셜 미디어 공유에 도움을 줄 수 있습니다. 개선 제안:
버그 리스크: 이 코드 조각은 SEO 및 소셜 미디어 공유를 위한 메타 태그를 설정하는 데 유용하지만, 개선을 위해 이미지 경로를 절대 경로로 수정하고 공통 메타 태그를 별도 파일로 관리하는 것이 좋습니다. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,38 +6,51 @@ import Button, { | |
| TextColor, | ||
| TextSize, | ||
| } from '@/components/common/Button/Button'; | ||
| import Head from 'next/head'; | ||
| import Link from 'next/link'; | ||
|
|
||
| export default function NotFound404() { | ||
| return ( | ||
| <div className="flex h-screen flex-col items-center justify-center"> | ||
| <div className="flex flex-col items-center"> | ||
| <h1 | ||
| className="relative mt-[50px] text-[10rem] text-brand-primary | ||
| <> | ||
| <Head> | ||
| <title>404 Not Found</title> | ||
| <meta name="description" content="페이지를 찾을 수 없습니다." /> | ||
| <meta property="og:title" content="404 Not Found" /> | ||
| <meta property="og:description" content="페이지를 찾을 수 없습니다." /> | ||
| <meta | ||
| property="og:url" | ||
| content="https://coworkers-colla.netlify.app/404" | ||
| /> | ||
| </Head> | ||
| <div className="flex h-screen flex-col items-center justify-center"> | ||
| <div className="flex flex-col items-center"> | ||
| <h1 | ||
| className="relative mt-[50px] text-[10rem] text-brand-primary | ||
| mob:text-[6rem]" | ||
| > | ||
| <span className="relative inline-block animate-bounce404-1">4</span> | ||
| <span className="relative inline-block animate-bounce404-2">0</span> | ||
| <span className="relative inline-block animate-bounce404-3">4</span> | ||
| </h1> | ||
| <h2 className="text-[5rem] mob:text-[3rem] ">Not Found</h2> | ||
| > | ||
| <span className="relative inline-block animate-bounce404-1">4</span> | ||
| <span className="relative inline-block animate-bounce404-2">0</span> | ||
| <span className="relative inline-block animate-bounce404-3">4</span> | ||
| </h1> | ||
| <h2 className="text-[5rem] mob:text-[3rem] ">Not Found</h2> | ||
| </div> | ||
| <p className="mb-10 text-2xl mob:text-xl-semibold"> | ||
| 페이지를 찾을 수 없습니다. | ||
| </p> | ||
| <Link href="/"> | ||
| <Button | ||
| textSize={TextSize.Large} | ||
| buttonStyle={ButtonStyle.Box} | ||
| textColor={TextColor.White} | ||
| buttonBackgroundColor={ButtonBackgroundColor.None} | ||
| buttonBorderColor={ButtonBorderColor.LightGray} | ||
| buttonPadding={ButtonPadding.Large} | ||
| className="border-2" | ||
| > | ||
| 메인 페이지로 돌아가기 | ||
| </Button> | ||
| </Link> | ||
| </div> | ||
| <p className="mb-10 text-2xl mob:text-xl-semibold"> | ||
| 페이지를 찾을 수 없습니다. | ||
| </p> | ||
| <Link href="/"> | ||
| <Button | ||
| textSize={TextSize.Large} | ||
| buttonStyle={ButtonStyle.Box} | ||
| textColor={TextColor.White} | ||
| buttonBackgroundColor={ButtonBackgroundColor.None} | ||
| buttonBorderColor={ButtonBorderColor.LightGray} | ||
| buttonPadding={ButtonPadding.Large} | ||
| className="border-2" | ||
| > | ||
| 메인 페이지로 돌아가기 | ||
| </Button> | ||
| </Link> | ||
| </div> | ||
| </> | ||
| ); | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 코드 리뷰를 하겠습니다. 이 코드에서 가장 큰 변경 사항은 |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 코드 패치는 기능적으로 중요한 변경 사항을 추가하고 있습니다.
개선 제안:
버그 리스크:
이 코드 변경사항은 사이트의 SEO 향상과 사용자 경험 향상에 도움이 될 수 있습니다. 페이지 제목과 설명을 제공하여 사이트가 검색 엔진에서 높은 순위로 표시되고 사용자에게 명확한 페이지 내용을 제공할 수 있습니다. 따라서 이 코드 변경은 효과적일 것으로 보입니다.