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
30,071 changes: 21,382 additions & 8,689 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
"@copilotkit/react-core": "^1.3.2",
"@copilotkit/react-textarea": "^1.3.2",
"@copilotkit/react-ui": "^1.3.2",
"@copilotkit/runtime": "^1.10.1",
"@copilotkit/shared": "^1.3.2",
"@google/generative-ai": "^0.21.0",
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-popover": "^1.1.14",
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-toast": "^1.2.2",
"@tanstack/react-table": "^8.20.5",
"@vercel/analytics": "^1.3.1",
Expand All @@ -37,7 +38,7 @@
"next": "14.2.14",
"next-themes": "^0.3.0",
"react": "^18",
"react-day-picker": "^8.10.1",
"react-day-picker": "^9.8.1",
"react-dom": "^18",
"tailwind-merge": "^2.5.3",
"tailwindcss-animate": "^1.0.7"
Expand Down
28 changes: 0 additions & 28 deletions src/app/api/scrape/route.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const metadata = {

export default function RootLayout({ children }) {
return (
<html lang="en">
<html lang="en" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
Expand Down
9 changes: 4 additions & 5 deletions src/app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ export default function Home() {
<div className="bg-primary-foreground/40 dark:bg-primary/5">
<Header />
<div className="text-center italic mt-3 text-sky-700 font-bold">
Track Your GitHub Pull Requests for Various Open Source Events
with AI Assistance
Track PRs for Open Source Events with AI
</div>
<div className="container">
<div className="container mx-auto">
<UserInput />
<ResultTable />
</div>
Expand All @@ -35,9 +34,9 @@ export default function Home() {
}
defaultOpen={false}
labels={{
title: "AI Powered Github Pull Request Tracker",
title: "PR Tracker",
initial: [
"Hello there! 👋 I can assist you in retrieving the details of GitHub pull requests for events like Hacktoberfest, Devfest, or general submissions.",
"Hello there! 👋 I can assist you in retrieving the details of GitHub pull requests.",
"Please note: I'm currently using a free version of the Groq model, so responses may sometimes be slower or less accurate, and too many frequent requests at same time may result in rate limit exceeded errors with empty responses. Please try after sometime in such cases. But I'm continually improving!",
],
}}
Expand Down
73 changes: 73 additions & 0 deletions src/components/FromDatePicker.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
"use client";

import * as React from "react";
import { ChevronDownIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import {
Popover,
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover";
import { useData } from "@/lib/hooks/use-data";
import { useSearchParams } from "next/navigation";

export default function FromDatePicker() {
const { dateRange, setDateRange } = useData();

const [open, setOpen] = React.useState(false);

const searchParams = useSearchParams();
const from = searchParams.get("from");

React.useEffect(() => {
if (from) {
const startDate = new Date(from);

if (!isNaN(startDate)) {
setDateRange((prev) => ({ ...prev, from: startDate.toLocaleDateString("en-CA") }));
} else {
console.error("Invalid date format for 'from':", from);
}
}
}, [from, setDateRange]);

return (
<div className="flex flex-col gap-3 w-full">
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<Button
variant="outline"
id="date"
className="w-full justify-between font-normal"
>
{dateRange.from ? dateRange.from : "Start date"}
<ChevronDownIcon />
</Button>
</PopoverTrigger>

<PopoverContent className="w-auto overflow-hidden p-0" align="start">
<Calendar
initialFocus
mode="single"
captionLayout="dropdown"
selected={dateRange.from}
onSelect={(currDate) => {
const FromDate = currDate.toLocaleDateString("en-CA");
setDateRange((prev) => ({
...prev,
from: FromDate,
}));
setOpen(false);
}}
disabled={(currentDate) => {
const today = new Date();
today.setHours(0, 0, 0, 0);
return currentDate > today;
}}
/>
</PopoverContent>
</Popover>
</div>
);
}
74 changes: 74 additions & 0 deletions src/components/ToDatePicker.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
"use client";

import * as React from "react";
import { ChevronDownIcon } from "lucide-react";

import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import {
Popover,
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover";
import { useData } from "@/lib/hooks/use-data";
import { useSearchParams } from "next/navigation";

export default function ToDatePicker() {
const { dateRange, setDateRange } = useData();

const [open, setOpen] = React.useState(false);

const searchParams = useSearchParams();
const to = searchParams.get("to");

React.useEffect(() => {
if (to) {
const endDate = new Date(to);

if (!isNaN(endDate)) {
setDateRange((prev) => ({ ...prev, to: endDate.toLocaleDateString("en-CA") }));
} else {
console.error("Invalid date format for 'from':", from);
}
}
}, [to, setDateRange]);

return (
<div className="flex flex-col gap-3 w-full">
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<Button
variant="outline"
id="date"
className="w-full justify-between font-normal"
>
{dateRange.to ? dateRange.to : "End date"}
<ChevronDownIcon />
</Button>
</PopoverTrigger>

<PopoverContent className="w-auto overflow-hidden p-0" align="start">
<Calendar
initialFocus
mode="single"
captionLayout="dropdown"
selected={dateRange.to}
onSelect={(currDate) => {
const ToDate = currDate.toLocaleDateString("en-CA");
setDateRange((prev) => ({
...prev,
to: ToDate,
}));
setOpen(false);
}}
disabled={(currentDate) => {
const today = new Date();
today.setHours(0, 0, 0, 0);
return currentDate > today;
}}
/>
</PopoverContent>
</Popover>
</div>
);
}
Loading