Skip to content

Commit 0fdc3b8

Browse files
[autofix.ci] apply automated fixes
1 parent 0ca3a6a commit 0fdc3b8

File tree

2 files changed

+14023
-17409
lines changed

2 files changed

+14023
-17409
lines changed

frontend/src/components/magicui/aurora-text.tsx

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"use client";
1+
'use client';
22

3-
import type { CSSProperties } from "react";
4-
import React, { useEffect, useId, useRef } from "react";
3+
import type { CSSProperties } from 'react';
4+
import React, { useEffect, useId, useRef } from 'react';
55

66
interface AuroraTextProps {
77
children: React.ReactNode;
@@ -12,8 +12,8 @@ interface AuroraTextProps {
1212

1313
export function AuroraText({
1414
children,
15-
className = "",
16-
colors = ["#FF0080", "#7928CA", "#0070F3", "#38bdf8", "#a855f7", "#2dd4bf"],
15+
className = '',
16+
colors = ['#FF0080', '#7928CA', '#0070F3', '#38bdf8', '#a855f7', '#2dd4bf'],
1717
speed = 1,
1818
}: AuroraTextProps) {
1919
const canvasRef = useRef<HTMLCanvasElement>(null);
@@ -66,9 +66,9 @@ export function AuroraText({
6666
};
6767

6868
updateFontSize();
69-
window.addEventListener("resize", updateFontSize);
69+
window.addEventListener('resize', updateFontSize);
7070

71-
return () => window.removeEventListener("resize", updateFontSize);
71+
return () => window.removeEventListener('resize', updateFontSize);
7272
}, [className]);
7373

7474
// Update effect to set ready state after dimensions are computed
@@ -85,16 +85,16 @@ export function AuroraText({
8585
};
8686

8787
updateDimensions();
88-
window.addEventListener("resize", updateDimensions);
88+
window.addEventListener('resize', updateDimensions);
8989

90-
return () => window.removeEventListener("resize", updateDimensions);
90+
return () => window.removeEventListener('resize', updateDimensions);
9191
}, [children, fontSize]);
9292

9393
useEffect(() => {
9494
const canvas = canvasRef.current;
9595
if (!canvas) return;
9696

97-
const ctx = canvas.getContext("2d");
97+
const ctx = canvas.getContext('2d');
9898
if (!ctx) return;
9999

100100
// Set canvas size
@@ -128,12 +128,12 @@ export function AuroraText({
128128
0,
129129
x,
130130
y,
131-
canvas.width * 0.4,
131+
canvas.width * 0.4
132132
);
133133

134134
gradient.addColorStop(0, `${color}99`);
135135
gradient.addColorStop(0.5, `${color}33`);
136-
gradient.addColorStop(1, "#00000000");
136+
gradient.addColorStop(1, '#00000000');
137137

138138
ctx.fillStyle = gradient;
139139
ctx.fillRect(0, 0, canvas.width, canvas.height);
@@ -149,8 +149,8 @@ export function AuroraText({
149149
ref={containerRef}
150150
className={`relative inline-block align-middle ${className}`}
151151
style={{
152-
width: dimensions.width || "auto",
153-
height: dimensions.height || "auto",
152+
width: dimensions.width || 'auto',
153+
height: dimensions.height || 'auto',
154154
}}
155155
>
156156
{/* Hidden text for SEO */}
@@ -160,10 +160,10 @@ export function AuroraText({
160160
<span
161161
style={{
162162
opacity: isReady ? 0 : 1,
163-
transition: "opacity 0.2s ease-in",
164-
position: isReady ? "absolute" : "relative",
165-
display: "inline-block",
166-
whiteSpace: "nowrap",
163+
transition: 'opacity 0.2s ease-in',
164+
position: isReady ? 'absolute' : 'relative',
165+
display: 'inline-block',
166+
whiteSpace: 'nowrap',
167167
}}
168168
aria-hidden="true"
169169
>
@@ -174,7 +174,7 @@ export function AuroraText({
174174
className="absolute inset-0"
175175
style={{
176176
opacity: isReady ? 1 : 0,
177-
transition: "opacity 0.2s ease-in",
177+
transition: 'opacity 0.2s ease-in',
178178
}}
179179
aria-hidden="true"
180180
>

0 commit comments

Comments
 (0)