diff --git a/.env.example b/.env.example index 3114755..b945480 100644 --- a/.env.example +++ b/.env.example @@ -1,10 +1,7 @@ -AIRTABLE_API_KEY= -AIRTABLE_BASE_ID= RAINDROP_ACCESS_TOKEN= UNSPLASH_ACCESS_KEY= GOOGLE_CLIENT_EMAIL= GOOGLE_PRIVATE_KEY= -GUMROAD_API_KEY= UPSTASH_REDIS_REST_URL= UPSTASH_REDIS_REST_TOKEN= NEXT_PUBLIC_API_URL=http://localhost:3000/api/ diff --git a/components/a.tsx b/components/a.tsx index 81740dc..f834f90 100644 --- a/components/a.tsx +++ b/components/a.tsx @@ -4,11 +4,11 @@ import { ReactNode } from "react"; export type Props = { children: ReactNode; href: string; - blank: boolean; + blank?: boolean; className?: string; }; -function A({ children, href, blank, className, ...props }: Props) { +function A({ children, href, blank = true, className, ...props }: Props) { const isBlank = blank ? { rel: "noopener noreferrer", diff --git a/components/bookmark-card.tsx b/components/bookmark-card.tsx index 4baa25d..3891bad 100644 --- a/components/bookmark-card.tsx +++ b/components/bookmark-card.tsx @@ -1,58 +1,24 @@ import A from "components/a"; -import IconUp from "components/icons/up"; import type { IBookmark } from "types/Bookmark"; import { parseISO, formatDistanceToNowStrict } from "date-fns"; import { tr } from "date-fns/locale"; -import useFetch from "use-http"; - -function BookmarkCard({ - bookmark, - vote, -}: { - bookmark: IBookmark; - vote: boolean; -}) { - const apiPath = `bookmark/vote/${bookmark._id}`; - const { data = { count: 0 } } = useFetch(apiPath, vote ? [] : null); - const { patch, response } = useFetch(apiPath); - - const onVote = async () => { - await patch(); - if (!response.ok) alert(response.data.message); - }; +function BookmarkCard({ bookmark }: { bookmark: IBookmark }) { return ( -
- {vote && ( - - )} - -
-

- - {bookmark.title} - -

+
+

+ {bookmark.title} +

-
- {bookmark.domain} - - - {formatDistanceToNowStrict(parseISO(bookmark.created), { - addSuffix: true, - locale: tr, - })} - -
+
+ {bookmark.domain} + + + {formatDistanceToNowStrict(parseISO(bookmark.created), { + addSuffix: true, + locale: tr, + })} +
); diff --git a/components/bookmark-layout.tsx b/components/bookmark-layout.tsx index ce31892..21f69ad 100644 --- a/components/bookmark-layout.tsx +++ b/components/bookmark-layout.tsx @@ -24,20 +24,14 @@ export default function BookmarkLayout({ data, year, onlyThisWeek = false }) {

{date}. Hafta, {year}

-
+
{data[date].map((item) => { - return ( - - ); + return ; })}
@@ -47,8 +41,8 @@ export default function BookmarkLayout({ data, year, onlyThisWeek = false }) {
Tüm listeyi görüntüle → diff --git a/components/footer.tsx b/components/footer.tsx index b402d09..4e02e0a 100644 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -7,9 +7,7 @@ function Footer() {

Bu web sitesinin kaynak kodlarına{" "} - - Github üzerinden - {" "} + Github üzerinden{" "} ulaşabilirsiniz.

diff --git a/components/header.tsx b/components/header.tsx index dac3be0..d281422 100644 --- a/components/header.tsx +++ b/components/header.tsx @@ -5,7 +5,6 @@ const MENU = { "/": "Giriş", "/videos": "Eğitimler", "/photos": "Fotoğraf", - // "/desk": "Masam", "/bookmarks": "Yer imleri", }; @@ -30,7 +29,7 @@ function Header() { setTheme(resolvedTheme === "dark" ? "light" : "dark") } > - {resolvedTheme === "dark" ? "🌞" : "🌚"} + {resolvedTheme === "dark" ? "🌝" : "🌚"}
diff --git a/components/metric-card.tsx b/components/metric-card.tsx index e5a31c7..f05ce6c 100644 --- a/components/metric-card.tsx +++ b/components/metric-card.tsx @@ -6,16 +6,10 @@ function MetricCard({ children, href = "", data, prefix = "" }) { return (
- {href ? ( - - {children} - - ) : ( - children - )} + {href ? {children} : children}

{prefix} {commaNumber(data)} diff --git a/components/nav-item.tsx b/components/nav-item.tsx index b9bec1c..40a6d40 100644 --- a/components/nav-item.tsx +++ b/components/nav-item.tsx @@ -12,7 +12,7 @@ function NavItem({ href, children }) { className={cx( "px-2 py-1 rounded", isActive && - "text-gray-900 bg-gray-100 dark:text-white dark:bg-gray-800" + "text-zinc-900 bg-zinc-100 dark:text-white dark:bg-zinc-800" )} > {children} diff --git a/components/photos.tsx b/components/photos.tsx index e54e957..172b509 100644 --- a/components/photos.tsx +++ b/components/photos.tsx @@ -24,7 +24,7 @@ function Photos({ data }) { {data.map((item) => { return (

- + {children} diff --git a/components/video-card.tsx b/components/video-card.tsx index 6ac701e..0e7ea0f 100644 --- a/components/video-card.tsx +++ b/components/video-card.tsx @@ -13,7 +13,7 @@ export default function VideoCard({ title, url, itemsCount }) { check ? "opacity-50" : "" )} > -