Skip to content

Commit 8356bf5

Browse files
[autofix.ci] apply automated fixes
1 parent 94ba29b commit 8356bf5

File tree

2 files changed

+73
-73
lines changed

2 files changed

+73
-73
lines changed

frontend/src/components/expandable-card-demo-grid.tsx

+34-34
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"use client";
2-
import Image from "next/image";
3-
import React, { useEffect, useId, useRef, useState } from "react";
4-
import { AnimatePresence, motion } from "framer-motion";
5-
import { useOutsideClick } from "@/hooks/use-outside-click";
1+
'use client';
2+
import Image from 'next/image';
3+
import React, { useEffect, useId, useRef, useState } from 'react';
4+
import { AnimatePresence, motion } from 'framer-motion';
5+
import { useOutsideClick } from '@/hooks/use-outside-click';
66

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

1414
useEffect(() => {
1515
function onKeyDown(event: KeyboardEvent) {
16-
if (event.key === "Escape") {
16+
if (event.key === 'Escape') {
1717
setActive(false);
1818
}
1919
}
2020

21-
if (active && typeof active === "object") {
22-
document.body.style.overflow = "hidden";
21+
if (active && typeof active === 'object') {
22+
document.body.style.overflow = 'hidden';
2323
} else {
24-
document.body.style.overflow = "auto";
24+
document.body.style.overflow = 'auto';
2525
}
2626

27-
window.addEventListener("keydown", onKeyDown);
28-
return () => window.removeEventListener("keydown", onKeyDown);
27+
window.addEventListener('keydown', onKeyDown);
28+
return () => window.removeEventListener('keydown', onKeyDown);
2929
}, [active]);
3030

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

3333
return (
3434
<>
3535
<AnimatePresence>
36-
{active && typeof active === "object" && (
36+
{active && typeof active === 'object' && (
3737
<motion.div
3838
initial={{ opacity: 0 }}
3939
animate={{ opacity: 1 }}
@@ -43,7 +43,7 @@ export default function ExpandableCardDemo() {
4343
)}
4444
</AnimatePresence>
4545
<AnimatePresence>
46-
{active && typeof active === "object" ? (
46+
{active && typeof active === 'object' ? (
4747
<div className="fixed inset-0 grid place-items-center z-[100]">
4848
<motion.button
4949
key={`button-${active.title}-${id}`}
@@ -118,7 +118,7 @@ export default function ExpandableCardDemo() {
118118
exit={{ opacity: 0 }}
119119
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]"
120120
>
121-
{typeof active.content === "function"
121+
{typeof active.content === 'function'
122122
? active.content()
123123
: active.content}
124124
</motion.div>
@@ -203,11 +203,11 @@ export const CloseIcon = () => {
203203

204204
const cards = [
205205
{
206-
description: "Lana Del Rey",
207-
title: "Summertime Sadness",
208-
src: "https://assets.aceternity.com/demos/lana-del-rey.jpeg",
209-
ctaText: "Visit",
210-
ctaLink: "https://ui.aceternity.com/templates",
206+
description: 'Lana Del Rey',
207+
title: 'Summertime Sadness',
208+
src: 'https://assets.aceternity.com/demos/lana-del-rey.jpeg',
209+
ctaText: 'Visit',
210+
ctaLink: 'https://ui.aceternity.com/templates',
211211
content: () => {
212212
return (
213213
<p>
@@ -226,11 +226,11 @@ const cards = [
226226
},
227227
},
228228
{
229-
description: "Babbu Maan",
230-
title: "Mitran Di Chhatri",
231-
src: "https://assets.aceternity.com/demos/babbu-maan.jpeg",
232-
ctaText: "Visit",
233-
ctaLink: "https://ui.aceternity.com/templates",
229+
description: 'Babbu Maan',
230+
title: 'Mitran Di Chhatri',
231+
src: 'https://assets.aceternity.com/demos/babbu-maan.jpeg',
232+
ctaText: 'Visit',
233+
ctaLink: 'https://ui.aceternity.com/templates',
234234
content: () => {
235235
return (
236236
<p>
@@ -249,11 +249,11 @@ const cards = [
249249
},
250250

251251
{
252-
description: "Metallica",
253-
title: "For Whom The Bell Tolls",
254-
src: "https://assets.aceternity.com/demos/metallica.jpeg",
255-
ctaText: "Visit",
256-
ctaLink: "https://ui.aceternity.com/templates",
252+
description: 'Metallica',
253+
title: 'For Whom The Bell Tolls',
254+
src: 'https://assets.aceternity.com/demos/metallica.jpeg',
255+
ctaText: 'Visit',
256+
ctaLink: 'https://ui.aceternity.com/templates',
257257
content: () => {
258258
return (
259259
<p>
@@ -271,11 +271,11 @@ const cards = [
271271
},
272272
},
273273
{
274-
description: "Lord Himesh",
275-
title: "Aap Ka Suroor",
276-
src: "https://assets.aceternity.com/demos/aap-ka-suroor.jpeg",
277-
ctaText: "Visit",
278-
ctaLink: "https://ui.aceternity.com/templates",
274+
description: 'Lord Himesh',
275+
title: 'Aap Ka Suroor',
276+
src: 'https://assets.aceternity.com/demos/aap-ka-suroor.jpeg',
277+
ctaText: 'Visit',
278+
ctaLink: 'https://ui.aceternity.com/templates',
279279
content: () => {
280280
return (
281281
<p>

frontend/src/components/expandable-card-demo-standard.tsx

+39-39
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"use client";
2-
import Image from "next/image";
3-
import React, { useEffect, useId, useRef, useState } from "react";
4-
import { AnimatePresence, motion } from "framer-motion";
5-
import { useOutsideClick } from "@/hooks/use-outside-click";
1+
'use client';
2+
import Image from 'next/image';
3+
import React, { useEffect, useId, useRef, useState } from 'react';
4+
import { AnimatePresence, motion } from 'framer-motion';
5+
import { useOutsideClick } from '@/hooks/use-outside-click';
66

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

1414
useEffect(() => {
1515
function onKeyDown(event: KeyboardEvent) {
16-
if (event.key === "Escape") {
16+
if (event.key === 'Escape') {
1717
setActive(false);
1818
}
1919
}
2020

21-
if (active && typeof active === "object") {
22-
document.body.style.overflow = "hidden";
21+
if (active && typeof active === 'object') {
22+
document.body.style.overflow = 'hidden';
2323
} else {
24-
document.body.style.overflow = "auto";
24+
document.body.style.overflow = 'auto';
2525
}
2626

27-
window.addEventListener("keydown", onKeyDown);
28-
return () => window.removeEventListener("keydown", onKeyDown);
27+
window.addEventListener('keydown', onKeyDown);
28+
return () => window.removeEventListener('keydown', onKeyDown);
2929
}, [active]);
3030

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

3333
return (
3434
<>
3535
<AnimatePresence>
36-
{active && typeof active === "object" && (
36+
{active && typeof active === 'object' && (
3737
<motion.div
3838
initial={{ opacity: 0 }}
3939
animate={{ opacity: 1 }}
@@ -43,7 +43,7 @@ export default function ExpandableCardDemo() {
4343
)}
4444
</AnimatePresence>
4545
<AnimatePresence>
46-
{active && typeof active === "object" ? (
46+
{active && typeof active === 'object' ? (
4747
<div className="fixed inset-0 grid place-items-center z-[100]">
4848
<motion.button
4949
key={`button-${active.title}-${id}`}
@@ -115,7 +115,7 @@ export default function ExpandableCardDemo() {
115115
exit={{ opacity: 0 }}
116116
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]"
117117
>
118-
{typeof active.content === "function"
118+
{typeof active.content === 'function'
119119
? active.content()
120120
: active.content}
121121
</motion.div>
@@ -206,11 +206,11 @@ export const CloseIcon = () => {
206206

207207
const cards = [
208208
{
209-
description: "Lana Del Rey",
210-
title: "Summertime Sadness",
211-
src: "https://assets.aceternity.com/demos/lana-del-rey.jpeg",
212-
ctaText: "Play",
213-
ctaLink: "https://ui.aceternity.com/templates",
209+
description: 'Lana Del Rey',
210+
title: 'Summertime Sadness',
211+
src: 'https://assets.aceternity.com/demos/lana-del-rey.jpeg',
212+
ctaText: 'Play',
213+
ctaLink: 'https://ui.aceternity.com/templates',
214214
content: () => {
215215
return (
216216
<p>
@@ -229,11 +229,11 @@ const cards = [
229229
},
230230
},
231231
{
232-
description: "Babbu Maan",
233-
title: "Mitran Di Chhatri",
234-
src: "https://assets.aceternity.com/demos/babbu-maan.jpeg",
235-
ctaText: "Play",
236-
ctaLink: "https://ui.aceternity.com/templates",
232+
description: 'Babbu Maan',
233+
title: 'Mitran Di Chhatri',
234+
src: 'https://assets.aceternity.com/demos/babbu-maan.jpeg',
235+
ctaText: 'Play',
236+
ctaLink: 'https://ui.aceternity.com/templates',
237237
content: () => {
238238
return (
239239
<p>
@@ -252,11 +252,11 @@ const cards = [
252252
},
253253

254254
{
255-
description: "Metallica",
256-
title: "For Whom The Bell Tolls",
257-
src: "https://assets.aceternity.com/demos/metallica.jpeg",
258-
ctaText: "Play",
259-
ctaLink: "https://ui.aceternity.com/templates",
255+
description: 'Metallica',
256+
title: 'For Whom The Bell Tolls',
257+
src: 'https://assets.aceternity.com/demos/metallica.jpeg',
258+
ctaText: 'Play',
259+
ctaLink: 'https://ui.aceternity.com/templates',
260260
content: () => {
261261
return (
262262
<p>
@@ -274,11 +274,11 @@ const cards = [
274274
},
275275
},
276276
{
277-
description: "Led Zeppelin",
278-
title: "Stairway To Heaven",
279-
src: "https://assets.aceternity.com/demos/led-zeppelin.jpeg",
280-
ctaText: "Play",
281-
ctaLink: "https://ui.aceternity.com/templates",
277+
description: 'Led Zeppelin',
278+
title: 'Stairway To Heaven',
279+
src: 'https://assets.aceternity.com/demos/led-zeppelin.jpeg',
280+
ctaText: 'Play',
281+
ctaLink: 'https://ui.aceternity.com/templates',
282282
content: () => {
283283
return (
284284
<p>
@@ -295,11 +295,11 @@ const cards = [
295295
},
296296
},
297297
{
298-
description: "Mustafa Zahid",
299-
title: "Toh Phir Aao",
300-
src: "https://assets.aceternity.com/demos/toh-phir-aao.jpeg",
301-
ctaText: "Play",
302-
ctaLink: "https://ui.aceternity.com/templates",
298+
description: 'Mustafa Zahid',
299+
title: 'Toh Phir Aao',
300+
src: 'https://assets.aceternity.com/demos/toh-phir-aao.jpeg',
301+
ctaText: 'Play',
302+
ctaLink: 'https://ui.aceternity.com/templates',
303303
content: () => {
304304
return (
305305
<p>

0 commit comments

Comments
 (0)