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
34 changes: 34 additions & 0 deletions app/Auto-generated-Blog/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"use client";

import { AppSidebar } from "@/components/app-sidebar";
import { SiteHeader } from "@/components/site-header";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import AutoGeneratedDashboard from "@/components/blogs/dashboard/auto-generated-dashboard"

export default function Page() {
return (
<SidebarProvider
style={
{
"--sidebar-width": "calc(var(--spacing) * 72)",
"--header-height": "calc(var(--spacing) * 12)",
} as React.CSSProperties
}
>
<AppSidebar variant="inset" />
<SidebarInset className="h-[calc(100vh-20px)] flex flex-col overflow-hidden">
{/* Sticky header */}
<div className="sticky top-0 z-10 bg-background">
<SiteHeader title="Auto-generated Blogs" />
</div>

{/* Scrollable content */}
<div className="flex-1 overflow-y-auto px-4 lg:px-6 landing-page">
<div className="@container/main flex flex-1 flex-col gap-6 py-4">
<AutoGeneratedDashboard />
</div>
</div>
</SidebarInset>
</SidebarProvider>
);
}
34 changes: 34 additions & 0 deletions app/Manual-Blog/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"use client";

import { AppSidebar } from "@/components/app-sidebar";
import { SiteHeader } from "@/components/site-header";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import AdminDashboard from "@/components/blogs/dashboard/admin-dashboard"

export default function Page() {
return (
<SidebarProvider
style={
{
"--sidebar-width": "calc(var(--spacing) * 72)",
"--header-height": "calc(var(--spacing) * 12)",
} as React.CSSProperties
}
>
<AppSidebar variant="inset" />
<SidebarInset className="h-[calc(100vh-20px)] flex flex-col overflow-hidden">
{/* Sticky header */}
<div className="sticky top-0 z-10 bg-background">
<SiteHeader title="Auto-generated Blogs" />
</div>

{/* Scrollable content */}
<div className="flex-1 overflow-y-auto px-4 lg:px-6 landing-page">
<div className="@container/main flex flex-1 flex-col gap-6 py-4">
<AdminDashboard />
</div>
</div>
</SidebarInset>
</SidebarProvider>
);
}
9 changes: 7 additions & 2 deletions components/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,15 @@ const data = {
],
administration: [
{
name: "Blog Administration",
url: "/blog-administration",
name: "Manual Blog Administration",
url: "/Manual-Blog",
icon: IconNotes,
},
{
name: "Auto Generated Blog Administration",
url: "/Auto-generated-Blog",
icon: IconNotes,
},
{
name: "Post Administration",
url: "/post-administration",
Expand Down
82 changes: 82 additions & 0 deletions components/blogs/auto-generated-mock-data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import type { AutoGeneratedBlog } from "./types"

export const mockAutoGeneratedBlogs: AutoGeneratedBlog[] = [
{
id: "auto-1",
title: "Two Sum - LeetCode Solution",
platform: "leetcode",
author: "john_doe",
status: "success",
createdAt: "2025-01-15T10:30:00Z",
blogUrl: "/blog/two-sum-leetcode-solution",
sourceUrl: "https://leetcode.com/problems/two-sum/",
},
{
id: "auto-2",
title: "Binary Search Implementation",
platform: "leetcode",
author: "jane_smith",
status: "error",
createdAt: "2025-01-14T14:20:00Z",
errorMessage: "Invalid markdown formatting in solution description",
sourceUrl: "https://leetcode.com/problems/binary-search/",
},
{
id: "auto-3",
title: "Maximum Subarray - Kadane's Algorithm",
platform: "leetcode",
author: "alex_dev",
status: "success",
createdAt: "2025-01-13T09:15:00Z",
blogUrl: "/blog/maximum-subarray-kadanes",
sourceUrl: "https://leetcode.com/problems/maximum-subarray/",
},
{
id: "auto-4",
title: "Chef and Strings - CodeChef",
platform: "codechef",
author: "coding_master",
status: "pending",
createdAt: "2025-01-12T16:45:00Z",
sourceUrl: "https://www.codechef.com/problems/CHEFSTR1",
},
{
id: "auto-5",
title: "Merge Intervals Problem",
platform: "leetcode",
author: "john_doe",
status: "success",
createdAt: "2025-01-11T11:00:00Z",
blogUrl: "/blog/merge-intervals-solution",
sourceUrl: "https://leetcode.com/problems/merge-intervals/",
},
{
id: "auto-6",
title: "Array Rotation - HackerRank",
platform: "hackerrank",
author: "jane_smith",
status: "error",
createdAt: "2025-01-10T13:30:00Z",
errorMessage: "Missing required metadata: tags not specified",
sourceUrl: "https://www.hackerrank.com/challenges/array-left-rotation/",
},
{
id: "auto-7",
title: "Longest Palindromic Substring",
platform: "leetcode",
author: "alex_dev",
status: "success",
createdAt: "2025-01-09T08:20:00Z",
blogUrl: "/blog/longest-palindromic-substring",
sourceUrl: "https://leetcode.com/problems/longest-palindromic-substring/",
},
{
id: "auto-8",
title: "Graph Traversal - DFS & BFS",
platform: "codeforces",
author: "coding_master",
status: "pending",
createdAt: "2025-01-08T15:10:00Z",
sourceUrl: "https://codeforces.com/problemset/problem/580/C",
},
]
Loading