Skip to content

Commit a3d05b4

Browse files
committed
some formatting, removing unused fields
1 parent 9a25701 commit a3d05b4

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/api/athena.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { fetcher } from '.'
1313
import { ATHENA_URL } from './config'
1414

1515
// Higher number is lower priority
16-
const HIGH_PRIORITY = 0
16+
export const COMMA_CONNECT_PRIORITY = 1
1717

1818
// Uploads expire after 1 week if device remains offline
1919
const EXPIRES_IN_SECONDS = 60 * 60 * 24 * 7
@@ -34,7 +34,7 @@ export const uploadFilesToUrls = (dongleId: string, files: UploadFile[]) =>
3434
allow_cellular: false,
3535
fn: file.filePath,
3636
headers: file.headers,
37-
priority: HIGH_PRIORITY,
37+
priority: COMMA_CONNECT_PRIORITY,
3838
url: file.url,
3939
})),
4040
},

src/components/UploadQueue.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import IconButton from '~/components/material/IconButton'
99
import StatisticBar from '~/components/material/StatisticBar'
1010
import { useUploadQueue } from '~/hooks/use-upload-queue'
1111
import { UploadItem } from '~/types'
12+
import { COMMA_CONNECT_PRIORITY } from '~/api/athena'
1213

1314
interface UploadQueueProps {
1415
dongleId: string
@@ -41,7 +42,9 @@ const QueueItem: Component<{ item: UploadItem }> = (props) => {
4142
<div class="flex flex-col mb-2 pt-2">
4243
<div class="flex items-center justify-between flex-wrap mb-1 gap-x-4 min-w-0">
4344
<div class="flex items-center min-w-0 flex-1">
44-
<Icon class="text-on-surface-variant flex-shrink-0 mr-2">{props.item.priority === 0 ? 'face' : 'local_fire_department'}</Icon>
45+
<Icon class="text-on-surface-variant flex-shrink-0 mr-2">
46+
{props.item.priority === COMMA_CONNECT_PRIORITY ? 'face' : 'local_fire_department'}
47+
</Icon>
4548
<div class="flex min-w-0 gap-1">
4649
<span class="text-body-sm font-mono truncate text-on-surface">
4750
{[props.item.route, props.item.segment, props.item.filename].join(' ')}

src/components/material/Icon.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export type IconProps = {
1717
name: IconName
1818
filled?: boolean
1919
size?: '20' | '24' | '40' | '48'
20-
tooltip?: string
2120
}
2221

2322
/**

src/pages/dashboard/activities/DeviceActivity.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ const DeviceActivity: VoidComponent<DeviceActivityProps> = (props) => {
170170
</div>
171171
<div class="flex flex-col gap-2">
172172
<span class="text-label-sm uppercase">Routes</span>
173-
<Suspense>
174-
<RouteList dongleId={props.dongleId} />
175-
</Suspense>
173+
<RouteList dongleId={props.dongleId} />
176174
</div>
177175
</div>
178176
</>

src/pages/dashboard/activities/RouteActivity.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createResource, createSignal, lazy, Suspense, type VoidComponent } from
33
import { setRouteViewed } from '~/api/athena'
44
import { getDevice } from '~/api/devices'
55
import { getProfile } from '~/api/profile'
6-
import { getRouteWithSegments } from '~/api/route'
6+
import { getRoute } from '~/api/route'
77
import { dayjs } from '~/utils/format'
88

99
import IconButton from '~/components/material/IconButton'
@@ -27,7 +27,7 @@ const RouteActivity: VoidComponent<RouteActivityProps> = (props) => {
2727
const [videoRef, setVideoRef] = createSignal<HTMLVideoElement>()
2828

2929
const routeName = () => `${props.dongleId}|${props.dateStr}`
30-
const [route] = createResource(routeName, getRouteWithSegments)
30+
const [route] = createResource(routeName, getRoute)
3131
const [startTime] = createResource(route, (route) => dayjs(route.start_time)?.format('ddd, MMM D, YYYY'))
3232

3333
function onTimelineChange(newTime: number) {

0 commit comments

Comments
 (0)