Refactor admin actions and improve code formatting: Standardize import statements, enhance error handling messages, and apply consistent formatting across event, user, and preference management functions for better readability and maintainability.
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
This commit is contained in:
@@ -10,7 +10,10 @@ interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
|
||||
label?: string;
|
||||
}
|
||||
|
||||
const getGradientStyle = (variant: "hp" | "xp" | "default", percentage: number) => {
|
||||
const getGradientStyle = (
|
||||
variant: "hp" | "xp" | "default",
|
||||
percentage: number
|
||||
) => {
|
||||
if (variant === "hp") {
|
||||
if (percentage > 60) {
|
||||
return {
|
||||
@@ -50,7 +53,10 @@ export default function ProgressBar({
|
||||
return (
|
||||
<div className={className} {...props}>
|
||||
{showLabel && (
|
||||
<div className="flex justify-between text-xs mb-1" style={{ color: "var(--gray-400)" }}>
|
||||
<div
|
||||
className="flex justify-between text-xs mb-1"
|
||||
style={{ color: "var(--gray-400)" }}
|
||||
>
|
||||
<span>{label || variant.toUpperCase()}</span>
|
||||
<span>
|
||||
{value} / {max}
|
||||
@@ -74,7 +80,8 @@ export default function ProgressBar({
|
||||
<div
|
||||
className="absolute inset-0"
|
||||
style={{
|
||||
background: "linear-gradient(to right, transparent, color-mix(in srgb, var(--foreground) 10%, transparent), transparent)",
|
||||
background:
|
||||
"linear-gradient(to right, transparent, color-mix(in srgb, var(--foreground) 10%, transparent), transparent)",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -88,4 +95,3 @@ export default function ProgressBar({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user