From 4869fe80eeb3b0f64f6f6631608e578a50775385 Mon Sep 17 00:00:00 2001 From: Vxrcel Date: Wed, 24 Jul 2024 22:55:55 +0100 Subject: [PATCH] fix build errors --- .../login/magic-link/link-sent/page.tsx | 2 +- .../(landing-routes)/blog/comments/page.tsx | 4 +- .../preview-template/page.tsx | 2 +- src/components/blog/BlogCard.tsx | 65 +++++++++ src/components/layouts/index.tsx | 6 +- src/components/layouts/navbar/index.tsx | 16 ++- src/components/ui/pagination.tsx | 125 ++++++++++++++++++ 7 files changed, 206 insertions(+), 14 deletions(-) create mode 100644 src/components/blog/BlogCard.tsx create mode 100644 src/components/ui/pagination.tsx diff --git a/src/app/(auth-routes)/login/magic-link/link-sent/page.tsx b/src/app/(auth-routes)/login/magic-link/link-sent/page.tsx index cd109566f..d74a74405 100644 --- a/src/app/(auth-routes)/login/magic-link/link-sent/page.tsx +++ b/src/app/(auth-routes)/login/magic-link/link-sent/page.tsx @@ -4,7 +4,7 @@ import { Check } from "lucide-react"; import { Button } from "~/components/ui/button"; -export const handleOpenEmail = () => { +const handleOpenEmail = () => { window.location.href = "mailto:"; }; const MagicLinkSuccess = () => { diff --git a/src/app/(landing-routes)/blog/comments/page.tsx b/src/app/(landing-routes)/blog/comments/page.tsx index 7f42c1e24..10d902c4d 100644 --- a/src/app/(landing-routes)/blog/comments/page.tsx +++ b/src/app/(landing-routes)/blog/comments/page.tsx @@ -1,7 +1,7 @@ import { Session } from "next-auth"; -import Comment from "~/components/common/comment"; -import { sampleComments } from "~/components/common/comment/sample-comments"; +import Comment from "~/components/common/Comment"; +import { sampleComments } from "~/components/common/Comment/sample-comments"; const CommentPage = () => { const mockSession: Session = { diff --git a/src/app/dashboard/(admin)/admin/email/generate-with-html/preview-template/page.tsx b/src/app/dashboard/(admin)/admin/email/generate-with-html/preview-template/page.tsx index 56b1bf273..0ce359b88 100644 --- a/src/app/dashboard/(admin)/admin/email/generate-with-html/preview-template/page.tsx +++ b/src/app/dashboard/(admin)/admin/email/generate-with-html/preview-template/page.tsx @@ -1,4 +1,4 @@ -import HtmlTemplateViewer from "./_component.tsx/index.jsx"; +import HtmlTemplateViewer from "./_component.tsx"; const page = () => { return ; diff --git a/src/components/blog/BlogCard.tsx b/src/components/blog/BlogCard.tsx new file mode 100644 index 000000000..1a7dbae04 --- /dev/null +++ b/src/components/blog/BlogCard.tsx @@ -0,0 +1,65 @@ +import Image from "next/image"; + +type New = { + id: number; + thumbnailUrl: string; +}; + +type newTypes = { + id: number; + name: string; + color: string; + title: string; + date: string; + timeRead: string; +}; + +const BlogCard = ({ + article, + newsType, +}: { + article: New; + newsType: newTypes; +}) => { + const { thumbnailUrl } = article; + return ( +
+
+ img +
+

+ {newsType.name} +

+
+
+
+

+ {newsType.title} +

+
+

+ {newsType.date} +

+
+

+ {newsType.timeRead} +

+
+
+
+
+ ); +}; + +export default BlogCard; diff --git a/src/components/layouts/index.tsx b/src/components/layouts/index.tsx index e9b87fe93..a26424b83 100644 --- a/src/components/layouts/index.tsx +++ b/src/components/layouts/index.tsx @@ -1,7 +1,7 @@ import React from "react"; -import Footer from "./Footer"; -import Navbar from "./Navbar"; +import Footer from "./footer"; +import Navbar from "./navbar"; interface IProperties { children: React.ReactNode; @@ -9,7 +9,7 @@ interface IProperties { const index: React.FC = ({ children }) => { return ( -
+
{children}
diff --git a/src/components/layouts/navbar/index.tsx b/src/components/layouts/navbar/index.tsx index d7da17790..98ccca3fb 100644 --- a/src/components/layouts/navbar/index.tsx +++ b/src/components/layouts/navbar/index.tsx @@ -4,7 +4,6 @@ import { BellIcon, Menu, User } from "lucide-react"; import Link from "next/link"; import { useEffect, useState } from "react"; -import CustomButton from "~/components/common/common-button/common-button"; import Logo from "~/components/common/logo"; const navlinks = [ @@ -55,15 +54,18 @@ const Navbar = () => { })}
- Log in - - + + Get Started - +
diff --git a/src/components/ui/pagination.tsx b/src/components/ui/pagination.tsx new file mode 100644 index 000000000..3c54fca4c --- /dev/null +++ b/src/components/ui/pagination.tsx @@ -0,0 +1,125 @@ +import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"; +import * as React from "react"; + +import { ButtonProperties, buttonVariants } from "~/components/ui/button"; +import { cn } from "~/lib/utils"; + +const Pagination = ({ + className, + ...properties +}: React.ComponentProps<"nav">) => ( +