From 29ab20068514ba16a3b4a21f5a3c150cda8ba4da Mon Sep 17 00:00:00 2001 From: Rahul Sain Date: Tue, 5 Nov 2024 00:19:58 +0530 Subject: [PATCH] 80% fixed --- app/auth/signin/page.tsx | 185 ++++++++++++++-------------------- app/auth/signup/page.tsx | 207 ++++++-------------------------------- app/contributor/page.tsx | 49 +++++---- app/popular/repo/page.tsx | 2 +- components/boomarkRow.tsx | 18 +--- 5 files changed, 144 insertions(+), 317 deletions(-) diff --git a/app/auth/signin/page.tsx b/app/auth/signin/page.tsx index ca609f7..7320c43 100644 --- a/app/auth/signin/page.tsx +++ b/app/auth/signin/page.tsx @@ -15,7 +15,6 @@ import { FormItem, FormLabel, FormMessage, - FormDescription, } from "@/components/ui/form"; import { useToast } from "@/components/ui/use-toast"; import Link from "next/link"; @@ -73,117 +72,82 @@ export default function SignInPage() { }; return ( -<<<<<<< HEAD -
-<<<<<<< HEAD -
-

-======= -
-

->>>>>>> 659a15b4cdcdc3ff2a2e14f904eb60480af67792 - Login into git-trace -

-
-======= -
-
+
+
Logo -

Welcome to git-trace

-

Track all your github repositories here.

+

Welcome to git-trace

+

Track all your GitHub repositories here.

-
->>>>>>> 383e7974f0a0fff21996aa91b2c8c87f53f89daa -
- - ( - -<<<<<<< HEAD -<<<<<<< HEAD - Email - - + + ( + + Email + +
+ -======= - - Email - -======= - Email ->>>>>>> 383e7974f0a0fff21996aa91b2c8c87f53f89daa - -
- -
- -
+
+
->>>>>>> 659a15b4cdcdc3ff2a2e14f904eb60480af67792 - - - - )} - /> - ( - - Password - -<<<<<<< HEAD +
+
+ + + )} + /> + + ( + + Password + +
-======= -
- - -
->>>>>>> 659a15b4cdcdc3ff2a2e14f904eb60480af67792 - - - - )} - /> - - - -
-<<<<<<< HEAD -
- - Register -======= + +
+
+ +
+ )} + /> + + + + +
-

Or continue with

-
+
- + Forgot your password? - + Sign up for an account ->>>>>>> 383e7974f0a0fff21996aa91b2c8c87f53f89daa
-

+ +

© 2024 git-trace Inc. All rights reserved.

diff --git a/app/auth/signup/page.tsx b/app/auth/signup/page.tsx index a567215..afd36cb 100644 --- a/app/auth/signup/page.tsx +++ b/app/auth/signup/page.tsx @@ -81,168 +81,6 @@ export default function SignUpPage() { }; return ( -<<<<<<< HEAD -
-<<<<<<< HEAD -
-

-======= -
-

->>>>>>> 659a15b4cdcdc3ff2a2e14f904eb60480af67792 - Register in git-trace -

-
-
- - ( - -<<<<<<< HEAD - Email - - -======= - - Email - - -
- -
- -
-
->>>>>>> 659a15b4cdcdc3ff2a2e14f904eb60480af67792 -
- - This is the email address you will use to sign up. - - -
- )} - /> - ( - -<<<<<<< HEAD - Password - - -======= - - Password - - -
- - -
->>>>>>> 659a15b4cdcdc3ff2a2e14f904eb60480af67792 -
- - Enter a strong password for your account. - - -
- )} - /> - ( - - - Confirm Password - - -
- - -
-
- - Confirm password by entering it again - - -
- )} - /> - - - -
-
- - login - - - {/*
- - - Under Construction 🏗️ 🚧 - - console.log("underconstruction")} - className="text-sm text-[#425893] hover:text-gray-600" - > - - Use GitHub - - - -
*/} -=======
@@ -250,6 +88,7 @@ export default function SignUpPage() {

Register for git-trace

Create an account to track all your GitHub repositories.

+
( - Email + Email
- +
@@ -270,21 +113,26 @@ export default function SignUpPage() { )} /> + ( - Password + Password
-
@@ -293,24 +141,25 @@ export default function SignUpPage() {
)} /> + ( - Confirm Password + Confirm Password
@@ -320,11 +169,16 @@ export default function SignUpPage() { )} /> - +

Or sign up with

->>>>>>> 383e7974f0a0fff21996aa91b2c8c87f53f89daa
+
Already have an account?{" "} - Log in + + Log in +
-

© 2024 git-trace Inc. All rights reserved.

+ +

+ © 2024 git-trace Inc. All rights reserved. +

); diff --git a/app/contributor/page.tsx b/app/contributor/page.tsx index 868f462..7e9871a 100644 --- a/app/contributor/page.tsx +++ b/app/contributor/page.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react' import { motion, AnimatePresence } from 'framer-motion' +import Image from 'next/image' interface Contributor { id: number @@ -25,7 +26,15 @@ const ContributorCard: React.FC = ({ login, avatar_url, html_url, c className="bg-white dark:bg-black rounded-lg shadow-lg overflow-hidden" >
- {login} +
+ {login} +

{login}

{type}

@@ -75,33 +84,33 @@ const StatCard: React.FC = ({ label, value, icon }) => ( ) -export default function Component() { +export default function ContributorPage() { const [contributors, setContributors] = useState([]) const [repoStats, setRepoStats] = useState({ stars: 0, forks: 0, openIssues: 0 }) const [loading, setLoading] = useState(true) const [email, setEmail] = useState('') - useEffect(() => { - const fetchData = async () => { - try { - const contributorsResponse = await fetch('https://api.github.com/repos/rahulsainlll/git-trace/contributors') - const contributorsData: Contributor[] = await contributorsResponse.json() - setContributors(contributorsData) + const fetchData = async () => { + try { + const contributorsResponse = await fetch('https://api.github.com/repos/rahulsainlll/git-trace/contributors') + const contributorsData: Contributor[] = await contributorsResponse.json() + setContributors(contributorsData) - const repoResponse = await fetch('https://api.github.com/repos/rahulsainlll/git-trace') - const repoData = await repoResponse.json() - setRepoStats({ - stars: repoData.stargazers_count, - forks: repoData.forks_count, - openIssues: repoData.open_issues_count, - }) - } catch (error) { - console.error('Error fetching data:', error) - } finally { - setLoading(false) - } + const repoResponse = await fetch('https://api.github.com/repos/rahulsainlll/git-trace') + const repoData = await repoResponse.json() + setRepoStats({ + stars: repoData.stargazers_count, + forks: repoData.forks_count, + openIssues: repoData.open_issues_count, + }) + } catch (error) { + console.error('Error fetching data:', error) + } finally { + setLoading(false) } + } + useEffect(() => { fetchData() }, []) diff --git a/app/popular/repo/page.tsx b/app/popular/repo/page.tsx index a405b49..ef7b8c0 100644 --- a/app/popular/repo/page.tsx +++ b/app/popular/repo/page.tsx @@ -60,7 +60,7 @@ const RepositoryStats = () => { setError("Failed to fetch commit history"); } }; - + // Fetch top contributors const fetchContributors = async () => { try { diff --git a/components/boomarkRow.tsx b/components/boomarkRow.tsx index fee1406..5b7df24 100644 --- a/components/boomarkRow.tsx +++ b/components/boomarkRow.tsx @@ -49,7 +49,6 @@ export default function BookmarkRow({ }, body: JSON.stringify(newTodo), }); - // console.log(response) const createdTodo = await response.json(); setTodos((prev) => [...prev, createdTodo]); }; @@ -60,7 +59,6 @@ export default function BookmarkRow({ }); if (response.ok) { - // Update the local state to remove the deleted todo setTodos((prev) => prev.filter((todo) => todo.id !== todoId)); } else { console.error("Failed to delete the todo."); @@ -132,19 +130,13 @@ export default function BookmarkRow({ - {/* */} - + -<<<<<<< HEAD - -

Todos

-======= - +

Todos

->>>>>>> 383e7974f0a0fff21996aa91b2c8c87f53f89daa {/* Todos List */} {todos.length ? ( @@ -155,7 +147,6 @@ export default function BookmarkRow({ className="p-2 border-b flex justify-between items-center" >
- {/* Checkbox for marking todo as completed */}
- {/* Edit button */} - {/* Delete button */}