Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Mar 4, 2025
1 parent 796878c commit 2b9e2e3
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 73 deletions.
68 changes: 34 additions & 34 deletions frontend/src/components/expandable-card-demo-grid.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";
import Image from "next/image";
import React, { useEffect, useId, useRef, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
import { useOutsideClick } from "@/hooks/use-outside-click";
'use client';
import Image from 'next/image';
import React, { useEffect, useId, useRef, useState } from 'react';
import { AnimatePresence, motion } from 'framer-motion';
import { useOutsideClick } from '@/hooks/use-outside-click';

export default function ExpandableCardDemo() {
const [active, setActive] = useState<(typeof cards)[number] | boolean | null>(
Expand All @@ -13,27 +13,27 @@ export default function ExpandableCardDemo() {

useEffect(() => {
function onKeyDown(event: KeyboardEvent) {
if (event.key === "Escape") {
if (event.key === 'Escape') {
setActive(false);
}
}

if (active && typeof active === "object") {
document.body.style.overflow = "hidden";
if (active && typeof active === 'object') {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = "auto";
document.body.style.overflow = 'auto';
}

window.addEventListener("keydown", onKeyDown);
return () => window.removeEventListener("keydown", onKeyDown);
window.addEventListener('keydown', onKeyDown);
return () => window.removeEventListener('keydown', onKeyDown);
}, [active]);

useOutsideClick(ref, () => setActive(null));

return (
<>
<AnimatePresence>
{active && typeof active === "object" && (
{active && typeof active === 'object' && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
Expand All @@ -43,7 +43,7 @@ export default function ExpandableCardDemo() {
)}
</AnimatePresence>
<AnimatePresence>
{active && typeof active === "object" ? (
{active && typeof active === 'object' ? (
<div className="fixed inset-0 grid place-items-center z-[100]">
<motion.button
key={`button-${active.title}-${id}`}
Expand Down Expand Up @@ -118,7 +118,7 @@ export default function ExpandableCardDemo() {
exit={{ opacity: 0 }}
className="text-neutral-600 text-xs md:text-sm lg:text-base h-40 md:h-fit pb-10 flex flex-col items-start gap-4 overflow-auto dark:text-neutral-400 [mask:linear-gradient(to_bottom,white,white,transparent)] [scrollbar-width:none] [-ms-overflow-style:none] [-webkit-overflow-scrolling:touch]"
>
{typeof active.content === "function"
{typeof active.content === 'function'
? active.content()
: active.content}
</motion.div>
Expand Down Expand Up @@ -203,11 +203,11 @@ export const CloseIcon = () => {

const cards = [
{
description: "Lana Del Rey",
title: "Summertime Sadness",
src: "https://assets.aceternity.com/demos/lana-del-rey.jpeg",
ctaText: "Visit",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Lana Del Rey',
title: 'Summertime Sadness',
src: 'https://assets.aceternity.com/demos/lana-del-rey.jpeg',
ctaText: 'Visit',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand All @@ -226,11 +226,11 @@ const cards = [
},
},
{
description: "Babbu Maan",
title: "Mitran Di Chhatri",
src: "https://assets.aceternity.com/demos/babbu-maan.jpeg",
ctaText: "Visit",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Babbu Maan',
title: 'Mitran Di Chhatri',
src: 'https://assets.aceternity.com/demos/babbu-maan.jpeg',
ctaText: 'Visit',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand All @@ -249,11 +249,11 @@ const cards = [
},

{
description: "Metallica",
title: "For Whom The Bell Tolls",
src: "https://assets.aceternity.com/demos/metallica.jpeg",
ctaText: "Visit",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Metallica',
title: 'For Whom The Bell Tolls',
src: 'https://assets.aceternity.com/demos/metallica.jpeg',
ctaText: 'Visit',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand All @@ -271,11 +271,11 @@ const cards = [
},
},
{
description: "Lord Himesh",
title: "Aap Ka Suroor",
src: "https://assets.aceternity.com/demos/aap-ka-suroor.jpeg",
ctaText: "Visit",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Lord Himesh',
title: 'Aap Ka Suroor',
src: 'https://assets.aceternity.com/demos/aap-ka-suroor.jpeg',
ctaText: 'Visit',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand Down
78 changes: 39 additions & 39 deletions frontend/src/components/expandable-card-demo-standard.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";
import Image from "next/image";
import React, { useEffect, useId, useRef, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
import { useOutsideClick } from "@/hooks/use-outside-click";
'use client';
import Image from 'next/image';
import React, { useEffect, useId, useRef, useState } from 'react';
import { AnimatePresence, motion } from 'framer-motion';
import { useOutsideClick } from '@/hooks/use-outside-click';

export default function ExpandableCardDemo() {
const [active, setActive] = useState<(typeof cards)[number] | boolean | null>(
Expand All @@ -13,27 +13,27 @@ export default function ExpandableCardDemo() {

useEffect(() => {
function onKeyDown(event: KeyboardEvent) {
if (event.key === "Escape") {
if (event.key === 'Escape') {
setActive(false);
}
}

if (active && typeof active === "object") {
document.body.style.overflow = "hidden";
if (active && typeof active === 'object') {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = "auto";
document.body.style.overflow = 'auto';
}

window.addEventListener("keydown", onKeyDown);
return () => window.removeEventListener("keydown", onKeyDown);
window.addEventListener('keydown', onKeyDown);
return () => window.removeEventListener('keydown', onKeyDown);
}, [active]);

useOutsideClick(ref, () => setActive(null));

return (
<>
<AnimatePresence>
{active && typeof active === "object" && (
{active && typeof active === 'object' && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
Expand All @@ -43,7 +43,7 @@ export default function ExpandableCardDemo() {
)}
</AnimatePresence>
<AnimatePresence>
{active && typeof active === "object" ? (
{active && typeof active === 'object' ? (
<div className="fixed inset-0 grid place-items-center z-[100]">
<motion.button
key={`button-${active.title}-${id}`}
Expand Down Expand Up @@ -115,7 +115,7 @@ export default function ExpandableCardDemo() {
exit={{ opacity: 0 }}
className="text-neutral-600 text-xs md:text-sm lg:text-base h-40 md:h-fit pb-10 flex flex-col items-start gap-4 overflow-auto dark:text-neutral-400 [mask:linear-gradient(to_bottom,white,white,transparent)] [scrollbar-width:none] [-ms-overflow-style:none] [-webkit-overflow-scrolling:touch]"
>
{typeof active.content === "function"
{typeof active.content === 'function'
? active.content()
: active.content}
</motion.div>
Expand Down Expand Up @@ -206,11 +206,11 @@ export const CloseIcon = () => {

const cards = [
{
description: "Lana Del Rey",
title: "Summertime Sadness",
src: "https://assets.aceternity.com/demos/lana-del-rey.jpeg",
ctaText: "Play",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Lana Del Rey',
title: 'Summertime Sadness',
src: 'https://assets.aceternity.com/demos/lana-del-rey.jpeg',
ctaText: 'Play',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand All @@ -229,11 +229,11 @@ const cards = [
},
},
{
description: "Babbu Maan",
title: "Mitran Di Chhatri",
src: "https://assets.aceternity.com/demos/babbu-maan.jpeg",
ctaText: "Play",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Babbu Maan',
title: 'Mitran Di Chhatri',
src: 'https://assets.aceternity.com/demos/babbu-maan.jpeg',
ctaText: 'Play',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand All @@ -252,11 +252,11 @@ const cards = [
},

{
description: "Metallica",
title: "For Whom The Bell Tolls",
src: "https://assets.aceternity.com/demos/metallica.jpeg",
ctaText: "Play",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Metallica',
title: 'For Whom The Bell Tolls',
src: 'https://assets.aceternity.com/demos/metallica.jpeg',
ctaText: 'Play',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand All @@ -274,11 +274,11 @@ const cards = [
},
},
{
description: "Led Zeppelin",
title: "Stairway To Heaven",
src: "https://assets.aceternity.com/demos/led-zeppelin.jpeg",
ctaText: "Play",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Led Zeppelin',
title: 'Stairway To Heaven',
src: 'https://assets.aceternity.com/demos/led-zeppelin.jpeg',
ctaText: 'Play',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand All @@ -295,11 +295,11 @@ const cards = [
},
},
{
description: "Mustafa Zahid",
title: "Toh Phir Aao",
src: "https://assets.aceternity.com/demos/toh-phir-aao.jpeg",
ctaText: "Play",
ctaLink: "https://ui.aceternity.com/templates",
description: 'Mustafa Zahid',
title: 'Toh Phir Aao',
src: 'https://assets.aceternity.com/demos/toh-phir-aao.jpeg',
ctaText: 'Play',
ctaLink: 'https://ui.aceternity.com/templates',
content: () => {
return (
<p>
Expand Down

0 comments on commit 2b9e2e3

Please sign in to comment.