style: format with new style
This commit is contained in:
@@ -1,26 +1,29 @@
|
||||
import z from "zod";
|
||||
import z from 'zod'
|
||||
|
||||
export const FeedbackSchema = z.object({
|
||||
message: z.string().min(5).max(1000),
|
||||
type: z.enum(["bug", "suggestion", "appreciate", "other"]),
|
||||
page: z.string().optional(),
|
||||
});
|
||||
type: z.enum(['bug', 'suggestion', 'appreciate', 'other']),
|
||||
page: z.string().optional()
|
||||
})
|
||||
|
||||
export const feedbackOptions = [
|
||||
{ label: "🐞 Bug", value: "bug" },
|
||||
{ label: '🐞 Bug', value: 'bug' },
|
||||
{
|
||||
label: "💡 Suggestion",
|
||||
value: "suggestion",
|
||||
label: '💡 Suggestion',
|
||||
value: 'suggestion'
|
||||
},
|
||||
{ label: "📂 Other", value: "other" },
|
||||
{ label: '📂 Other', value: 'other' },
|
||||
{
|
||||
label: "❤️ Appreciation",
|
||||
value: "appreciate",
|
||||
},
|
||||
];
|
||||
label: '❤️ Appreciation',
|
||||
value: 'appreciate'
|
||||
}
|
||||
]
|
||||
|
||||
export function getFeedbackOption(value: string): { label: string; value: string } {
|
||||
return feedbackOptions.find((option) => option.value === value);
|
||||
export function getFeedbackOption(value: string): {
|
||||
label: string
|
||||
value: string
|
||||
} {
|
||||
return feedbackOptions.find((option) => option.value === value)
|
||||
}
|
||||
|
||||
export type FeedbackType = z.infer<typeof FeedbackSchema>;
|
||||
export type FeedbackType = z.infer<typeof FeedbackSchema>
|
||||
|
Reference in New Issue
Block a user