chore: remove unused RepackValues function to clean up code
This commit is contained in:
parent
539f4dc4f8
commit
612c779e29
1 changed files with 0 additions and 19 deletions
|
|
@ -286,22 +286,3 @@ type UnpackOptions = {
|
|||
export const UnpackOptions = ({ options }: UnpackOptions) => {
|
||||
return options.map((v, idx) => ({ label: v, value: idx.toString() }));
|
||||
};
|
||||
|
||||
type RepackValues = {
|
||||
values: string | string[];
|
||||
options: string[];
|
||||
};
|
||||
export const RepackValues = ({ values, options }: RepackValues) => {
|
||||
if (Array.isArray(values)) {
|
||||
return values.map((v) => ({
|
||||
// biome-ignore lint/style/noNonNullAssertion: <intended>
|
||||
label: options[Number.parseInt(v)]!,
|
||||
value: v,
|
||||
}));
|
||||
}
|
||||
return {
|
||||
// biome-ignore lint/style/noNonNullAssertion: <intended>
|
||||
label: options[Number.parseInt(values)]!,
|
||||
value: values,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue