Skip to content

Commit 00628c7

Browse files
committed
chore: format all files
1 parent afdb9ff commit 00628c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+4781
-4794
lines changed

components.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
2-
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "new-york",
4-
"rsc": false,
5-
"tsx": true,
6-
"tailwind": {
7-
"config": "",
8-
"css": "web-app/src/index.css",
9-
"baseColor": "neutral",
10-
"cssVariables": true,
11-
"prefix": ""
12-
},
13-
"iconLibrary": "lucide",
14-
"aliases": {
15-
"components": "@/components",
16-
"utils": "@/lib/utils",
17-
"ui": "@/components/ui",
18-
"lib": "@/lib",
19-
"hooks": "@/hooks"
20-
},
21-
"registries": {
22-
"@coss": "https://coss.com/ui/r/{name}.json"
23-
}
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "web-app/src/index.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"aliases": {
15+
"components": "@/components",
16+
"utils": "@/lib/utils",
17+
"ui": "@/components/ui",
18+
"lib": "@/lib",
19+
"hooks": "@/hooks"
20+
},
21+
"registries": {
22+
"@coss": "https://coss.com/ui/r/{name}.json"
23+
}
2424
}
Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
import {
2-
AlertDialog,
3-
AlertDialogContent,
4-
AlertDialogDescription,
5-
AlertDialogFooter,
6-
AlertDialogHeader,
7-
AlertDialogTitle,
8-
AlertDialogClose,
9-
} from "./ui/alert-dialog";
10-
import type { AlertType } from "../types/ui";
11-
import { useTranslation } from "@/i18n";
12-
import { buttonVariants } from "./ui/button";
2+
AlertDialog,
3+
AlertDialogContent,
4+
AlertDialogDescription,
5+
AlertDialogFooter,
6+
AlertDialogHeader,
7+
AlertDialogTitle,
8+
AlertDialogClose,
9+
} from './ui/alert-dialog'
10+
import type { AlertType } from '../types/ui'
11+
import { useTranslation } from '@/i18n'
12+
import { buttonVariants } from './ui/button'
1313

1414
interface AppAlertDialogProps {
15-
isOpen: boolean;
16-
title: string;
17-
description: string;
18-
type?: AlertType;
19-
onClose: () => void;
15+
isOpen: boolean
16+
title: string
17+
description: string
18+
type?: AlertType
19+
onClose: () => void
2020
}
2121

2222
export function AppAlertDialog({
23-
isOpen,
24-
title,
25-
description,
26-
onClose,
23+
isOpen,
24+
title,
25+
description,
26+
onClose,
2727
}: AppAlertDialogProps) {
28-
const { t } = useTranslation();
29-
return (
30-
<AlertDialog open={isOpen} onOpenChange={onClose}>
31-
<AlertDialogContent>
32-
<AlertDialogHeader>
33-
<AlertDialogTitle>{title}</AlertDialogTitle>
34-
<AlertDialogDescription>{description}</AlertDialogDescription>
35-
</AlertDialogHeader>
36-
<AlertDialogFooter>
37-
<AlertDialogClose
38-
onClick={onClose}
39-
className={buttonVariants({ variant: "default", size: "sm" })}
40-
>
41-
{t("common:close")}
42-
</AlertDialogClose>
43-
</AlertDialogFooter>
44-
</AlertDialogContent>
45-
</AlertDialog>
46-
);
28+
const { t } = useTranslation()
29+
return (
30+
<AlertDialog open={isOpen} onOpenChange={onClose}>
31+
<AlertDialogContent>
32+
<AlertDialogHeader>
33+
<AlertDialogTitle>{title}</AlertDialogTitle>
34+
<AlertDialogDescription>{description}</AlertDialogDescription>
35+
</AlertDialogHeader>
36+
<AlertDialogFooter>
37+
<AlertDialogClose
38+
onClick={onClose}
39+
className={buttonVariants({ variant: 'default', size: 'sm' })}
40+
>
41+
{t('common:close')}
42+
</AlertDialogClose>
43+
</AlertDialogFooter>
44+
</AlertDialogContent>
45+
</AlertDialog>
46+
)
4747
}
Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
import { useAppTranslation } from "../i18n/hooks";
2-
import { Select, SelectValue, SelectContent, SelectItem } from "./ui/select";
3-
import { buttonVariants } from "./ui/button";
4-
import type { ButtonProps } from "@base-ui/react";
5-
import { Select as RootSelect } from "@base-ui/react/select";
6-
import { cn } from "@/lib/utils";
1+
import { useAppTranslation } from '../i18n/hooks'
2+
import { Select, SelectValue, SelectContent, SelectItem } from './ui/select'
3+
import { buttonVariants } from './ui/button'
4+
import type { ButtonProps } from '@base-ui/react'
5+
import { Select as RootSelect } from '@base-ui/react/select'
6+
import { cn } from '@/lib/utils'
77

88
const LANGUAGES = [
9-
{ value: "en", label: "English" },
10-
{ value: "ru", label: "Русский" },
11-
{ value: "sr", label: "Српски" },
12-
{ value: "fr", label: "Français" },
13-
{ value: "zh-CN", label: "简体中文" },
14-
{ value: "zh-TW", label: "繁體中文" },
15-
{ value: "de", label: "Deutsch" },
16-
{ value: "ja", label: "日本語" },
17-
{ value: "th", label: "Thai" },
18-
{ value: "it", label: "Italiano" },
19-
{ value: "cs", label: "Čeština" },
20-
{ value: "es", label: "Español" },
21-
{ value: "pt-BR", label: "Português" },
22-
{ value: "ar", label: "العربية" },
23-
{ value: "fa", label: "فارسی" },
24-
{ value: "ko", label: "한국어" },
25-
{ value: "hi", label: "हिन्दी" },
26-
{ value: "pl", label: "Polski" },
27-
{ value: "uk", label: "Українська" },
28-
{ value: "tr", label: "Türkçe" },
29-
{ value: "no", label: "Norsk" },
30-
{ value: "bn", label: "বাংলা" },
31-
];
9+
{ value: 'en', label: 'English' },
10+
{ value: 'ru', label: 'Русский' },
11+
{ value: 'sr', label: 'Српски' },
12+
{ value: 'fr', label: 'Français' },
13+
{ value: 'zh-CN', label: '简体中文' },
14+
{ value: 'zh-TW', label: '繁體中文' },
15+
{ value: 'de', label: 'Deutsch' },
16+
{ value: 'ja', label: '日本語' },
17+
{ value: 'th', label: 'Thai' },
18+
{ value: 'it', label: 'Italiano' },
19+
{ value: 'cs', label: 'Čeština' },
20+
{ value: 'es', label: 'Español' },
21+
{ value: 'pt-BR', label: 'Português' },
22+
{ value: 'ar', label: 'العربية' },
23+
{ value: 'fa', label: 'فارسی' },
24+
{ value: 'ko', label: '한국어' },
25+
{ value: 'hi', label: 'हिन्दी' },
26+
{ value: 'pl', label: 'Polski' },
27+
{ value: 'uk', label: 'Українська' },
28+
{ value: 'tr', label: 'Türkçe' },
29+
{ value: 'no', label: 'Norsk' },
30+
{ value: 'bn', label: 'বাংলা' },
31+
]
3232

3333
export function LanguageSwitcher(props: ButtonProps) {
34-
const { i18n } = useAppTranslation();
34+
const { i18n } = useAppTranslation()
3535

36-
const currentLanguage =
37-
LANGUAGES.find((lang) => lang.value === i18n.language) || LANGUAGES[0];
36+
const currentLanguage =
37+
LANGUAGES.find((lang) => lang.value === i18n.language) || LANGUAGES[0]
3838

39-
const changeLanguage = (lng: string) => {
40-
i18n.changeLanguage(lng);
41-
window.dispatchEvent(new Event("languagechange"));
42-
};
39+
const changeLanguage = (lng: string) => {
40+
i18n.changeLanguage(lng)
41+
window.dispatchEvent(new Event('languagechange'))
42+
}
4343

44-
return (
45-
<Select
46-
// items={LANGUAGES}
47-
value={currentLanguage}
48-
onValueChange={(item) => {
49-
return item && changeLanguage(item?.value);
50-
}}
51-
>
52-
<RootSelect.Trigger
53-
{...props}
54-
className={cn(
55-
buttonVariants({ variant: "ghost", size: "sm" }),
56-
props.className
57-
)}
58-
>
59-
<SelectValue />
60-
</RootSelect.Trigger>
61-
<SelectContent>
62-
{LANGUAGES.map((lang) => (
63-
<SelectItem value={lang} key={lang.value}>
64-
{lang.label}
65-
</SelectItem>
66-
))}
67-
</SelectContent>
68-
</Select>
69-
);
44+
return (
45+
<Select
46+
// items={LANGUAGES}
47+
value={currentLanguage}
48+
onValueChange={(item) => {
49+
return item && changeLanguage(item?.value)
50+
}}
51+
>
52+
<RootSelect.Trigger
53+
{...props}
54+
className={cn(
55+
buttonVariants({ variant: 'ghost', size: 'sm' }),
56+
props.className
57+
)}
58+
>
59+
<SelectValue />
60+
</RootSelect.Trigger>
61+
<SelectContent>
62+
{LANGUAGES.map((lang) => (
63+
<SelectItem value={lang} key={lang.value}>
64+
{lang.label}
65+
</SelectItem>
66+
))}
67+
</SelectContent>
68+
</Select>
69+
)
7070
}

0 commit comments

Comments
 (0)