Skip to content
Open
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
26 changes: 25 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,31 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/crl-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Github Tracker</title>
<meta name="theme-color" content="#1a1a1a" />
<title>GitHub Tracker - Monitor GitHub User Activity</title>

<!-- Primary Meta Tags -->
<meta name="title" content="GitHub Tracker - Monitor GitHub User Activity" />
<meta name="description" content="Track and analyze the activity of any GitHub user. Monitor commits, PRs, issues, and repositories in real time." />

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://github-spy.netlify.app/" />
<meta property="og:site_name" content="GitHub Tracker" />
<meta property="og:title" content="GitHub Tracker - Monitor GitHub User Activity" />
<meta property="og:description" content="Track and analyze the activity of any GitHub user. Monitor commits, PRs, issues, and repositories in real time." />
<meta property="og:image" content="https://github-spy.netlify.app/og-image.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="GitHub Tracker preview" />

<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content="https://github-spy.netlify.app/" />
<meta name="twitter:title" content="GitHub Tracker - Monitor GitHub User Activity" />
<meta name="twitter:description" content="Track and analyze the activity of any GitHub user. Monitor commits, PRs, issues, and repositories in real time." />
<meta name="twitter:image" content="https://github-spy.netlify.app/og-image.png" />
<meta name="twitter:image:alt" content="GitHub Tracker preview" />
</head>
<body>
<div id="root"></div>
Expand Down
Binary file added public/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/hooks/usePageTitle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { useEffect } from 'react';

const APP_NAME = 'GitHub Tracker';

const usePageTitle = (title: string): void => {
useEffect(() => {
document.title = title ? `${title} — ${APP_NAME}` : APP_NAME;
return () => {
document.title = APP_NAME;
};
}, [title]);
};

export default usePageTitle;
2 changes: 2 additions & 0 deletions src/pages/About/About.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { motion } from "framer-motion";
import { Lightbulb, Users, Settings, Search } from "lucide-react";
import usePageTitle from "../../hooks/usePageTitle";

const features = [
{
Expand All @@ -20,6 +21,7 @@ const features = [
];

const About = () => {
usePageTitle("About");
return (
<div className="bg-gradient-to-br from-white to-gray-100 dark:from-gray-900 dark:to-gray-800 text-black dark:text-white min-h-screen">

Expand Down
2 changes: 2 additions & 0 deletions src/pages/Activity.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import usePageTitle from "../hooks/usePageTitle";
import ActivityFeed from "../components/ActivityFeed";
export default function Activity() {
usePageTitle("Activity");
return (
<div className="w-full h-full p-6 bg-gray-50 dark:bg-gray-800">
<div className="max-w-2xl mx-auto">
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Contact/Contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import {
} from "lucide-react";
import { ThemeContext } from "../../context/ThemeContext";
import type { ThemeContextType } from "../../context/ThemeContext";

import usePageTitle from "../../hooks/usePageTitle";
function Contact() {
usePageTitle("Contact");
const [showPopup, setShowPopup] = useState(false);
const [isSubmitting, setIsSubmitting] = useState(false);
const themeContext = useContext(ThemeContext) as ThemeContextType;
Expand Down
2 changes: 2 additions & 0 deletions src/pages/ContributorProfile/ContributorProfile.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import toast from "react-hot-toast";
import usePageTitle from "../../hooks/usePageTitle";

type PR = {
title: string;
Expand All @@ -16,6 +17,7 @@ type Profile = {

export default function ContributorProfile() {
const { username } = useParams();
usePageTitle(username ? `${username} — Contributor` : "Contributor Profile");
const [profile, setProfile] = useState<Profile | null>(null);
const [prs, setPRs] = useState<PR[]>([]);
const [loading, setLoading] = useState(true);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Contributors/Contributors.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import usePageTitle from "../../hooks/usePageTitle";
import {
Container,
Grid,
Expand All @@ -25,6 +26,7 @@ interface Contributor {
}

const ContributorsPage = () => {
usePageTitle("Contributors");
const [contributors, setContributors] = useState<Contributor[]>([]);
const [loading, setLoading] = useState<boolean>(true);
const [error, setError] = useState<string | null>(null);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import Hero from "../../components/Hero";
import HowItWorks from "../../components/HowItWorks";
import Features from "../../components/Features";
import usePageTitle from "../../hooks/usePageTitle";

function Home() {
usePageTitle("Home");
return (
<div className="">
<Hero />
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import axios from "axios";
import { useNavigate, Link } from "react-router-dom";
import { ThemeContext } from "../../context/ThemeContext";
import type { ThemeContextType } from "../../context/ThemeContext";
import usePageTitle from "../../hooks/usePageTitle";

const backendUrl = import.meta.env.VITE_BACKEND_URL;

Expand All @@ -12,6 +13,7 @@ interface LoginFormData {
}

const Login: React.FC = () => {
usePageTitle("Login");
const [formData, setFormData] = useState<LoginFormData>({ email: "", password: "" });
const [message, setMessage] = useState<string>("");
const [isLoading, setIsLoading] = useState<boolean>(false);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Privacy/PrivacyPolicy.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react';
import usePageTitle from '../../hooks/usePageTitle';
import {
FaShieldAlt, FaKey, FaDatabase, FaUserCheck, FaCheckCircle,
FaLock, FaClock, FaShareAlt, FaCookieBite, FaChild
} from 'react-icons/fa';

const PrivacyPolicy: React.FC = () => {
usePageTitle("Privacy Policy");
return (
<div className="w-full flex-1 flex flex-col items-stretch bg-gray-50 dark:bg-[#0f172a] min-h-full transition-colors duration-200 self-stretch">

Expand Down
3 changes: 3 additions & 0 deletions src/pages/Signup/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { motion } from "framer-motion";
import { User, Mail, Lock, Eye, EyeOff } from "lucide-react";
import { ThemeContext } from "../../context/ThemeContext";
import type { ThemeContextType } from "../../context/ThemeContext";
import usePageTitle from "../../hooks/usePageTitle";


const backendUrl = import.meta.env.VITE_BACKEND_URL;

Expand All @@ -15,6 +17,7 @@ interface SignUpFormData {
}

const SignUp: React.FC = () => {
usePageTitle("Sign Up")
const [formData, setFormData] = useState<SignUpFormData>({
username: "",
email: "",
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Tracker/Tracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { useTheme } from "@mui/material/styles";
import { useGitHubAuth } from "../../hooks/useGitHubAuth";
import { useGitHubData } from "../../hooks/useGitHubData";
import { KeyIcon } from "lucide-react";
import usePageTitle from "../../hooks/usePageTitle";

const ROWS_PER_PAGE = 10;

Expand All @@ -49,6 +50,7 @@ interface GitHubItem {
const Home: React.FC = () => {

const theme = useTheme();
usePageTitle("Tracker");

const {
username,
Expand Down
Loading