Skip to content

Commit e7789a1

Browse files
committed
refactor(configuration.ts): remove unused imports to clean up the codebase
style(chart.tsx): replace 'any' type with 'unknown' for better type safety Unused imports in `configuration.ts` are removed to improve code readability and maintainability. In `chart.tsx`, the 'any' type is replaced with 'unknown' to enhance type safety, encouraging developers to handle the data more explicitly and reducing potential runtime errors.
1 parent 2269d15 commit e7789a1

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

src/actions/configuration.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
"use server";
22

33
import { type ActionResponseSchema } from "@/types";
4-
import { type AsyncZippable, strToU8, zipSync } from "fflate";
5-
import { type z } from "zod";
6-
7-
import {
8-
type Schema_App_Configuration,
9-
type Schema_App_Configuration_Env,
10-
} from "@/types/schema";
11-
12-
import {
13-
base64Decode,
14-
base64Encode,
15-
encryptionService,
16-
} from "@/lib/utils.server";
4+
import { base64Encode, base64Decode } from "@/lib/utils.server";
175

186
export async function GenerateServiceAccountB64(
197
serviceAccount: string

src/components/ui/chart.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function ChartTooltipContent({
185185
>
186186
{!nestLabel ? tooltipLabel : null}
187187
<div className="grid gap-1.5">
188-
{payload.map((item: any, index: number) => {
188+
{payload.map((item: unknown, index: number) => {
189189
const key = `${nameKey || item.name || item.dataKey || "value"}`;
190190
const itemConfig = getPayloadConfigFromPayload(config, item, key);
191191
const indicatorColor = color || item.payload.fill || item.color;
@@ -282,7 +282,7 @@ function ChartLegendContent({
282282
className
283283
)}
284284
>
285-
{payload.map((item: any) => {
285+
{payload.map((item: unknown) => {
286286
const key = `${nameKey || item.dataKey || "value"}`;
287287
const itemConfig = getPayloadConfigFromPayload(config, item, key);
288288

0 commit comments

Comments
 (0)