Skip to content

Commit

Permalink
refactor(dashboard): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bryson-g committed Dec 4, 2024
1 parent 896e236 commit e9ffd9b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { TIME_RANGES, TIME_RANGES_NAMES, TimeRange, WF_RUN_STATUSES } from '@/app/constants'
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/components/ui/select'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
import { LHStatus, WfSpec } from 'littlehorse-client/proto'
import { ClockIcon } from 'lucide-react'
import LinkWithTenant from '@/app/[tenantId]/components/LinkWithTenant'
Expand Down
9 changes: 8 additions & 1 deletion dashboard/src/app/[tenantId]/components/Principal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { useWhoAmI } from '@/contexts/WhoAmIContext'
import { DropdownMenu, DropdownMenuSeparator, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel } from '@/components/ui/dropdown-menu'
import {
DropdownMenu,
DropdownMenuSeparator,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
} from '@/components/ui/dropdown-menu'
import { signOut } from 'next-auth/react'
import { FC, Fragment } from 'react'
function classNames(...classes: Array<string | boolean>) {
Expand Down
14 changes: 12 additions & 2 deletions dashboard/src/app/[tenantId]/components/TenantSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
'use client'
import { useWhoAmI } from '@/contexts/WhoAmIContext'
import { DropdownMenu, DropdownMenuSeparator, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from '@/components/ui/dropdown-menu'
import {
DropdownMenu,
DropdownMenuSeparator,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
} from '@/components/ui/dropdown-menu'
import { useParams, useRouter } from 'next/navigation'
import { FC } from 'react'

Expand Down Expand Up @@ -32,7 +38,11 @@ export const TenantSelector: FC = () => {
<div className="px-2 py-2 text-sm font-bold uppercase">Tenants</div>
<DropdownMenuSeparator />
{tenants.map(tenant => (
<DropdownMenuItem key={tenant} className="block w-full px-4 py-2 text-left text-sm hover:bg-gray-100" onClick={() => router.push(`/${tenant}`)}>
<DropdownMenuItem
key={tenant}
className="block w-full px-4 py-2 text-left text-sm hover:bg-gray-100"
onClick={() => router.push(`/${tenant}`)}
>
{tenant}
</DropdownMenuItem>
))}
Expand Down
7 changes: 1 addition & 6 deletions dashboard/src/app/[tenantId]/components/VersionSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { TagIcon } from 'lucide-react'
import { FC } from 'react'
import LinkWithTenant from './LinkWithTenant'
import {
Select,
SelectContent,
SelectTrigger,
SelectValue,
} from '@/components/ui/select'
import { Select, SelectContent, SelectTrigger, SelectValue } from '@/components/ui/select'

type Props = {
path: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import LinkWithTenant from '@/app/[tenantId]/components/LinkWithTenant'
import { SEARCH_DEFAULT_LIMIT } from '@/app/constants'
import { concatWfRunIds, localDateTimeToUTCIsoString, utcToLocalDateTime } from '@/app/utils'
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { useInfiniteQuery } from '@tanstack/react-query'
import { UserTaskDef as UserTaskDefProto, UserTaskRunStatus } from 'littlehorse-client/proto'
import { RefreshCwIcon } from 'lucide-react'
Expand Down Expand Up @@ -87,7 +87,7 @@ export const UserTaskDef: FC<Props> = ({ spec }) => {
<Button
onClick={() => setSelectedStatus(status)}
key={status}
variant={status === selectedStatus ? "default" : "outline"}
variant={status === selectedStatus ? 'default' : 'outline'}
className="rounded-none first:rounded-l-lg last:rounded-r-lg"
>
{status}
Expand Down

0 comments on commit e9ffd9b

Please sign in to comment.