Skip to content

Commit

Permalink
fix: build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VineeTagarwaL-code committed Oct 5, 2024
1 parent 921c71f commit 46aca6c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 40 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://blog.vineet.tech/tags</loc><lastmod>2024-09-28T16:23:23.761Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech/blog</loc><lastmod>2024-09-28T16:23:23.762Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech</loc><lastmod>2024-09-28T16:23:23.762Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech/blog</loc><lastmod>2024-10-05T14:28:43.689Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech/tags</loc><lastmod>2024-10-05T14:28:43.689Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://blog.vineet.tech</loc><lastmod>2024-10-05T14:28:43.689Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
1 change: 0 additions & 1 deletion src/app/actions/blog.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import rehypeSlug from "rehype-slug";
import { SuccessResponse } from "@/lib/success";

const getBlogs = withServerActionAsyncCatcher(async () => {
console.log("Fetching blogs");
const response = await axios.get(
`https://api.github.com/repos/${process.env.GITHUB_USERNAME}/${process.env.GITHUB_REPO_NAME}/git/trees/main?recursive=1`,
{
Expand Down
17 changes: 1 addition & 16 deletions src/components/Link-blogs.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
"use client";
import getFormattedDate from "@/utils/formatdate";
import { useState } from "react";
import { TitleHover } from "./title-hover";
export const LinkBlogs = (post: Meta) => {
const [isHovering, setIsHovering] = useState(false);

const handleMouseEnter = () => {
setIsHovering(true);
};

const handleMouseLeave = () => {
setIsHovering(false);
};

return (
<div className="hover:scale-[1.04] transition-all rounded-xl bg-white/40 dark:bg-stone-900/60 px-6 py-7 mb-6 relative z-40">
<h2
className="font-semibold text-2xl md:text-3xl relative group"
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
>
<h2 className="font-semibold text-2xl md:text-3xl relative group">
<TitleHover
imageLink={post.image}
width={200}
Expand Down
22 changes: 2 additions & 20 deletions src/components/title-hover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import {
useMotionValue,
useSpring,
} from "framer-motion";
import { Link } from "lucide-react";
import Image from "next/image";
import React, { useEffect, useState } from "react";
import React, { useState } from "react";

type TitleHoverProps = {
children: React.ReactNode;
Expand All @@ -27,37 +26,20 @@ export const TitleHover = ({
url,
}: TitleHoverProps) => {
const [isOpen, setOpen] = useState<boolean>(false);
const [isMounted, setMounted] = useState<boolean>(false);

useEffect(() => {
console.log(imageLink);
setMounted(true);
}, []);

const sprinConfig = { stiffness: 100, damping: 15 };
const x = useMotionValue(0);

const translateX = useSpring(x, sprinConfig);

let mouseMoveHandler = (event: any) => {
const mouseMoveHandler = (event: any) => {
const targetRect = event.target.getBoundingClientRect();
const eventOffsetX = event.clientX - targetRect.left;
const offsetFromCenter = (eventOffsetX - targetRect.width / 2) / 2; // Reduce the effect to make it subtle
x.set(offsetFromCenter);
};
return (
<>
{/* {isMounted ? (
<Image
src={image}
alt="hidden image"
width={width}
height={height}
layout="responsive"
priority={true}
/>
) : null} */}

<HoverCard.Root
openDelay={50}
closeDelay={100}
Expand Down

0 comments on commit 46aca6c

Please sign in to comment.