Skip to content

Commit c1d73de

Browse files
committed
Fixed prettier formatting
1 parent 8b9d377 commit c1d73de

10 files changed

Lines changed: 39 additions & 48 deletions

File tree

resources/js/components/app-sidebar.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@ import { NavFooter } from '@/components/nav-footer';
22
import { NavMain } from '@/components/nav-main';
33
import { NavUser } from '@/components/nav-user';
44
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar';
5-
import { console, deploymentsIndex, imagesIndex, logs, projectsIndex, remotesIndex, specsIndex, notificationsIndex, resourceManagerIndex } from '@/routes';
5+
import {
6+
console,
7+
deploymentsIndex,
8+
imagesIndex,
9+
logs,
10+
notificationsIndex,
11+
projectsIndex,
12+
remotesIndex,
13+
resourceManagerIndex,
14+
specsIndex,
15+
} from '@/routes';
616
import { type NavItem } from '@/types';
717
import { Link } from '@inertiajs/react';
818
import {

resources/js/components/image-add-dialog.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { Button } from '@/components/ui/button';
22
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog';
3-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
43
import { Input } from '@/components/ui/input';
54
import { Label } from '@/components/ui/label';
65
import { useRemotes } from '@/hooks/use-remotes';
76
import { Form } from '@inertiajs/react';
8-
import { ChevronDown, Loader2 } from 'lucide-react';
7+
import { Loader2 } from 'lucide-react';
98

109
interface Props {
1110
open: boolean;

resources/js/components/image-card.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { DockerImage } from '@/types';
22
import { Link } from '@inertiajs/react';
33

44
interface Props {
5-
image: DockerImage
5+
image: DockerImage;
66
}
77

88
export default function ImageCard({ image }: Props) {
@@ -13,9 +13,7 @@ export default function ImageCard({ image }: Props) {
1313
>
1414
<div className="mb-2 flex gap-2">
1515
<div className="min-w-0 flex-1">
16-
<p className="truncate">
17-
{image.name}
18-
</p>
16+
<p className="truncate">{image.name}</p>
1917
</div>
2018
</div>
2119
</Link>

resources/js/components/spec-card.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@ import type { Blueprint } from '@/types';
22
import { Link } from '@inertiajs/react';
33

44
interface Props {
5-
blueprint?: Blueprint
5+
blueprint?: Blueprint;
66
}
77

8-
export default function SpecCard({ blueprint }: Props ) {
8+
export default function SpecCard({ blueprint }: Props) {
99
return (
1010
<Link
1111
href={`/projects/${blueprint?.id}`}
1212
className="flex h-28 flex-col rounded-xl border border-sidebar-border/70 p-4 no-underline hover:cursor-pointer hover:border-muted-foreground dark:border-sidebar-border dark:hover:border-muted-foreground"
1313
>
1414
<div className="mb-2 flex gap-2">
1515
<div className="min-w-0 flex-1">
16-
<p className="truncate">
17-
{blueprint?.config.name}
18-
</p>
16+
<p className="truncate">{blueprint?.config.name}</p>
1917
</div>
2018
</div>
2119
</Link>

resources/js/hooks/use-deployments.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,15 @@ export function useDeployments() {
1111
const { data: deployments, isLoading } = useQuery<Blueprint[]>({
1212
queryKey: ['deployments', spec],
1313
queryFn: async () => {
14-
try {
14+
try {
1515
const response = await axios.get('/deployments/fetch', {
16-
params: Object.fromEntries(params)
16+
params: Object.fromEntries(params),
1717
});
1818
return response.data;
19-
} catch (error) {
20-
21-
}
19+
} catch (error) {}
2220
},
2321
staleTime: 5 * 60 * 1000,
2422
});
25-
2623

2724
const { remotes } = useRemotes();
2825
const remotesData = remotes || [];

resources/js/hooks/use-images.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ export function useImages(setOpen?: (open: boolean) => void) {
1010
const [imageRegistry, setImageRegistry] = useState('');
1111
const queryClient = useQueryClient();
1212

13-
const formSchema = z
14-
.object({
15-
image_registry: z
16-
.string()
17-
.min(1, 'Domain is required')
18-
.regex(/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/, 'Please enter a valid docker image registry'),
19-
branch: z.string().optional(),
20-
})
13+
const formSchema = z.object({
14+
image_registry: z
15+
.string()
16+
.min(1, 'Domain is required')
17+
.regex(/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/, 'Please enter a valid docker image registry'),
18+
branch: z.string().optional(),
19+
});
2120

2221
const validateForm = () => {
2322
const result = formSchema.safeParse({

resources/js/pages/deployments/index.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ import { useRemotes } from '@/hooks/use-remotes';
1010
import AppLayout from '@/layouts/app-layout';
1111
import { getRuntimeIcon } from '@/lib/runtime-icon';
1212
import { deploymentsIndex, deploymentsShow, servicesIndex } from '@/routes';
13-
import type { BreadcrumbItem, Service } from '@/types';
13+
import type { BreadcrumbItem } from '@/types';
1414
import { Head, Link, router } from '@inertiajs/react';
1515
import { ArrowUpRightIcon, ChevronLeft, ChevronRight, Factory } from 'lucide-react';
16-
import { useMemo, useState } from 'react';
1716
import { FaGitlab } from 'react-icons/fa6';
1817
import { RxGithubLogo } from 'react-icons/rx';
1918
import TimeAgo from 'react-timeago';
@@ -30,12 +29,12 @@ const breadcrumbs: BreadcrumbItem[] = [
3029
},
3130
];
3231
export default function Deployments() {
33-
const {
34-
deployments,
35-
isLoading: isDeploymentsLoading,
36-
normalizedDeployments,
32+
const {
33+
deployments,
34+
isLoading: isDeploymentsLoading,
35+
normalizedDeployments,
3736
currentPage,
38-
totalPages,
37+
totalPages,
3938
startIndex,
4039
endIndex,
4140
goToPage,

resources/js/pages/resources/images.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ImageAddDialog from '@/components/image-add-dialog';
2+
import ImageCard from '@/components/image-card';
23
import { Skeleton } from '@/components/ui/skeleton';
34
import { useImages } from '@/hooks/use-images';
45
import AppLayout from '@/layouts/app-layout';
@@ -7,7 +8,6 @@ import type { BreadcrumbItem, DockerImage } from '@/types';
78
import { Head } from '@inertiajs/react';
89
import { PlusCircle } from 'lucide-react';
910
import { useState } from 'react';
10-
import ImageCard from '@/components/image-card';
1111

1212
const breadcrumbs: BreadcrumbItem[] = [
1313
{
@@ -49,10 +49,7 @@ export default function Image() {
4949
) : (
5050
<>
5151
{images?.map((image: DockerImage) => (
52-
<ImageCard
53-
key={image.id}
54-
image={image}
55-
/>
52+
<ImageCard key={image.id} image={image} />
5653
))}
5754
</>
5855
)}

resources/js/pages/resources/remotes.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ export default function Remotes() {
5050
) : (
5151
<>
5252
{remotes?.map((remote: Remote) => (
53-
<RemoteCard
54-
key={remote.id}
55-
remote={remote}
56-
/>
53+
<RemoteCard key={remote.id} remote={remote} />
5754
))}
5855
</>
5956
)}

resources/js/pages/resources/specs.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import SpecCard from '@/components/spec-card';
12
import { Skeleton } from '@/components/ui/skeleton';
3+
import { useDeployments } from '@/hooks/use-deployments';
24
import AppLayout from '@/layouts/app-layout';
35
import { specsIndex } from '@/routes';
46
import type { Blueprint, BreadcrumbItem } from '@/types';
57
import { Head } from '@inertiajs/react';
6-
import SpecCard from '@/components/spec-card';
7-
import { useDeployments } from '@/hooks/use-deployments';
88

99
const breadcrumbs: BreadcrumbItem[] = [
1010
{
@@ -45,10 +45,7 @@ export default function Specs() {
4545
) : (
4646
<>
4747
{normalizedDeployments?.map((blueprint: Blueprint) => (
48-
<SpecCard
49-
key={blueprint.id}
50-
blueprint={blueprint}
51-
/>
48+
<SpecCard key={blueprint.id} blueprint={blueprint} />
5249
))}
5350
</>
5451
)}

0 commit comments

Comments
 (0)