Skip to content

Commit 6ac1263

Browse files
committed
refactor: format code
1 parent ccb952a commit 6ac1263

8 files changed

+37
-38
lines changed

app/layout.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ export default function RootLayout({
6969
buttonVariants({
7070
variant: "outline",
7171
size: "icon",
72-
className: "rounded-full w-10 h-10 overflow-hidden sm:block hidden",
73-
})
72+
className:
73+
"rounded-full w-10 h-10 overflow-hidden sm:block hidden",
74+
}),
7475
)}
7576
>
7677
<Image
@@ -96,7 +97,7 @@ export default function RootLayout({
9697
variant: "outline",
9798
size: "icon",
9899
className: "rounded-full mx-2 w-10 h-10 sm:flex hidden",
99-
})
100+
}),
100101
)}
101102
>
102103
<GitHubLogoIcon className="w-6 h-6" />

app/page.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function Home() {
2727
const [error, setError] = React.useState<string | null>(null);
2828
const [commitChanges, setcommitChanges] = React.useState<string | null>(null);
2929
const [commitMessages, setcommitMessages] = React.useState<string | null>(
30-
null
30+
null,
3131
);
3232

3333
const { toast } = useToast();
@@ -62,7 +62,7 @@ export default function Home() {
6262
toastVariants({
6363
variant: "destructive",
6464
className: "w-fit m-0 p-2 text-xs hover:bg-[#815305]/35",
65-
})
65+
}),
6666
)}
6767
onClick={() => handelSubmit({ suggestion })}
6868
>
@@ -86,7 +86,7 @@ export default function Home() {
8686

8787
const submitForm = (
8888
e: React.FormEvent<HTMLFormElement>,
89-
message: string | null
89+
message: string | null,
9090
): void => {
9191
e.preventDefault();
9292
handelSubmit({ suggestion: message || "" });
@@ -154,7 +154,7 @@ export default function Home() {
154154
disabled={isLoading}
155155
>
156156
{isLoading && <Spinner className="size-4" />}
157-
Generate
157+
Generate
158158
<CornerDownLeft className="size-3.5" />
159159
</Button>
160160
</div>

components/emptyScreen.tsx

+11-9
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,17 @@ const EmptyScreen = ({
4343
{randomMessage}
4444
</CardHeader>
4545
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3 mx-3 sm:mx-14 mt-4">
46-
{randomSuggestions.slice(0, suggestionCount).map((suggestion, index) => (
47-
<Card
48-
className="p-4 flex items-center w-full rounded-lg cursor-pointer hover:border-primary hover:bg-primary-foreground"
49-
key={index}
50-
onClick={() => onSubmit({ suggestion })}
51-
>
52-
<p className="text-sm ">{suggestion}</p>
53-
</Card>
54-
))}
46+
{randomSuggestions
47+
.slice(0, suggestionCount)
48+
.map((suggestion, index) => (
49+
<Card
50+
className="p-4 flex items-center w-full rounded-lg cursor-pointer hover:border-primary hover:bg-primary-foreground"
51+
key={index}
52+
onClick={() => onSubmit({ suggestion })}
53+
>
54+
<p className="text-sm ">{suggestion}</p>
55+
</Card>
56+
))}
5557
</div>
5658
</div>
5759
</div>

components/listSuggestion.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const ListSuggestion = ({
1313
commitChanges: string;
1414
submitForm: (
1515
e: React.FormEvent<HTMLFormElement>,
16-
message: string | null
16+
message: string | null,
1717
) => void;
1818
}) => {
1919
const [isEditMode, setIsEditMode] = useState<boolean>(false);

components/md-components.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const components = {
2222
<h1
2323
className={cn(
2424
"group font-heading mt-2 scroll-m-20 text-4xl font-bold",
25-
className
25+
className,
2626
)}
2727
{...props}
2828
/>
@@ -31,7 +31,7 @@ const components = {
3131
<h2
3232
className={cn(
3333
"group font-heading mt-12 scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0",
34-
className
34+
className,
3535
)}
3636
{...props}
3737
/>
@@ -40,7 +40,7 @@ const components = {
4040
<h3
4141
className={cn(
4242
"group font-heading mt-8 scroll-m-20 text-xl font-semibold tracking-tight",
43-
className
43+
className,
4444
)}
4545
{...props}
4646
/>
@@ -49,7 +49,7 @@ const components = {
4949
<h4
5050
className={cn(
5151
"group font-heading mt-8 scroll-m-20 text-lg font-semibold tracking-tight",
52-
className
52+
className,
5353
)}
5454
{...props}
5555
/>
@@ -58,7 +58,7 @@ const components = {
5858
<h5
5959
className={cn(
6060
"group mt-8 scroll-m-20 text-lg font-semibold tracking-tight",
61-
className
61+
className,
6262
)}
6363
{...props}
6464
/>
@@ -67,7 +67,7 @@ const components = {
6767
<h6
6868
className={cn(
6969
"group mt-8 scroll-m-20 text-base font-semibold tracking-tight",
70-
className
70+
className,
7171
)}
7272
{...props}
7373
/>
@@ -125,7 +125,7 @@ const components = {
125125
<th
126126
className={cn(
127127
"border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right",
128-
className
128+
className,
129129
)}
130130
{...props}
131131
/>
@@ -134,7 +134,7 @@ const components = {
134134
<td
135135
className={cn(
136136
"border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right",
137-
className
137+
className,
138138
)}
139139
{...props}
140140
/>
@@ -163,7 +163,7 @@ const components = {
163163
<pre
164164
className={cn(
165165
"mb-4 mt-6 max-h-[650px] shadow overflow-x-auto rounded-lg border bg-primary-foreground/70 font-semibold",
166-
className
166+
className,
167167
)}
168168
{...props}
169169
/>
@@ -214,7 +214,7 @@ const components = {
214214
<code
215215
className={cn(
216216
"relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-semibold text-sm",
217-
className
217+
className,
218218
)}
219219
{...props}
220220
/>

components/md/copy-button.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ export function CopyButton({
3939
<Button
4040
size="icon"
4141
variant="ghost"
42-
className={cn(
43-
"relative z-10 h-6 w-6 bg-card border",
44-
className,
45-
)}
42+
className={cn("relative z-10 h-6 w-6 bg-card border", className)}
4643
onClick={() => {
4744
copyToClipboardWithMeta(
4845
value,

components/ui/dialog.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const DialogOverlay = React.forwardRef<
2020
ref={ref}
2121
className={cn(
2222
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
23-
className
23+
className,
2424
)}
2525
{...props}
2626
/>
@@ -37,7 +37,7 @@ const DialogContent = React.forwardRef<
3737
ref={ref}
3838
className={cn(
3939
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
40-
className
40+
className,
4141
)}
4242
{...props}
4343
>
@@ -54,7 +54,7 @@ const DialogHeader = ({
5454
<div
5555
className={cn(
5656
"flex flex-col space-y-1.5 text-center sm:text-left",
57-
className
57+
className,
5858
)}
5959
{...props}
6060
/>
@@ -68,7 +68,7 @@ const DialogFooter = ({
6868
<div
6969
className={cn(
7070
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
71-
className
71+
className,
7272
)}
7373
{...props}
7474
/>
@@ -83,7 +83,7 @@ const DialogTitle = React.forwardRef<
8383
ref={ref}
8484
className={cn(
8585
"text-lg font-semibold leading-none tracking-tight",
86-
className
86+
className,
8787
)}
8888
{...props}
8989
/>

components/ui/toast.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ export const toastVariants = cva(
3030
variants: {
3131
variant: {
3232
default: "border bg-background text-foreground",
33-
destructive:
34-
"border-[#5b3b04] bg-[#191001] text-[#e5d07b]",
33+
destructive: "border-[#5b3b04] bg-[#191001] text-[#e5d07b]",
3534
},
3635
},
3736
defaultVariants: {

0 commit comments

Comments
 (0)