feat: update instructions convert
This commit is contained in:
parent
ab7d2d332a
commit
6a06d890aa
@ -1,6 +1,12 @@
|
|||||||
|
import { Instruction } from "@/types";
|
||||||
import { type ClassValue, clsx } from "clsx"
|
import { type ClassValue, clsx } from "clsx"
|
||||||
import { twMerge } from "tailwind-merge"
|
import { twMerge } from "tailwind-merge"
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export function cn(...inputs: ClassValue[]) {
|
||||||
return twMerge(clsx(inputs))
|
return twMerge(clsx(inputs))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const handleInstructions = (instructions: string): string =>
|
||||||
|
(JSON.parse(instructions) || []).map((line: Instruction) =>
|
||||||
|
`- ${line.element} in the ${line.location} has a mistake: ${line.mistake}, please update: ${line.improvement}.`).join("\n\n");
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user