Skip to content

Commit

Permalink
Converted all remaining selection .js to typescript (#4282)
Browse files Browse the repository at this point in the history
* Converted all remaining selection .js to typescript

* Deleted removed file from index exports

* Fix type of value within TimeZoneSelect

---------

Co-authored-by: Scott Rotvold <[email protected]>
  • Loading branch information
Azakahul and ScottJRotvold authored Feb 27, 2025
1 parent 0de00f1 commit 2b79ae4
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 33 deletions.
File renamed without changes.
File renamed without changes.
30 changes: 0 additions & 30 deletions web/src/app/selection/ServiceSelect.js

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ const query = gql`

export const TimeZoneSelect = makeQuerySelect('TimeZoneSelect', {
query,
mapDataNode: ({ id }) => ({ label: id, value: id }),
mapDataNode: (n: { id: string }) => ({ label: n.id, value: n.id }),
})
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { gql } from 'urql'
import { makeQuerySelect } from './QuerySelect'
import { User } from '../../schema'

const query = gql`
query ($input: UserSearchOptions) {
Expand Down Expand Up @@ -30,7 +31,7 @@ export const UserSelect = makeQuerySelect('UserSelect', {
defaultQueryVariables: { favoritesFirst: true },
query,
valueQuery,
mapDataNode: (u) => ({
mapDataNode: (u: User) => ({
value: u.id,
label: u.name,
subText: u.email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export * from './EscalationPolicySelect'
export * from './LabelKeySelect'
export * from './RotationSelect'
export * from './ScheduleSelect'
export * from './ServiceSelect'
export * from './SlackChannelSelect'
export * from './SlackUserGroupSelect'
export * from './TimeZoneSelect'
Expand Down

0 comments on commit 2b79ae4

Please sign in to comment.