Skip to content

Commit

Permalink
resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
charliepark committed Sep 10, 2024
2 parents 8d667ef + a0c29a5 commit 03b4b99
Show file tree
Hide file tree
Showing 71 changed files with 81 additions and 87 deletions.
2 changes: 1 addition & 1 deletion app/components/AttachEphemeralIpModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useForm } from 'react-hook-form'

import { useApiMutation, useApiQueryClient, usePrefetchedApiQuery } from '~/api'
import { ListboxField } from '~/components/form/fields/ListboxField'
import { useInstanceSelector } from '~/hooks'
import { useInstanceSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { Badge } from '~/ui/lib/Badge'
import { Modal } from '~/ui/lib/Modal'
Expand Down
2 changes: 1 addition & 1 deletion app/components/RoundedSector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import { useEffect, useMemo, useState } from 'react'

import { useReducedMotion } from '~/hooks'
import { useReducedMotion } from '~/hooks/use-reduce-motion'

export function RoundedSector({
angle,
Expand Down
2 changes: 1 addition & 1 deletion app/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { NavLink, useLocation } from 'react-router-dom'

import { Action16Icon, Document16Icon } from '@oxide/design-system/icons/react'

import { openQuickActions } from '~/hooks'
import { openQuickActions } from '~/hooks/use-quick-actions'
import { Button } from '~/ui/lib/Button'
import { Truncate } from '~/ui/lib/Truncate'

Expand Down
2 changes: 1 addition & 1 deletion app/components/TopBarPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
useSiloSelector,
useVpcRouterSelector,
useVpcSelector,
} from '~/hooks'
} from '~/hooks/use-params'
import { useCurrentUser } from '~/layouts/AuthenticatedLayout'
import { PAGE_SIZE } from '~/table/QueryTable'
import { Button } from '~/ui/lib/Button'
Expand Down
2 changes: 1 addition & 1 deletion app/components/form/fields/SubnetListbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useWatch, type FieldPath, type FieldValues } from 'react-hook-form'

import { useApiQuery } from '@oxide/api'

import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'

import { ListboxField, type ListboxFieldProps } from './ListboxField'

Expand Down
2 changes: 1 addition & 1 deletion app/components/form/fields/useItemsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { useMemo } from 'react'

import { useApiQuery } from '~/api'
import { useVpcSelector } from '~/hooks'
import { useVpcSelector } from '~/hooks/use-params'

/**
* Special value indicating no router. Must use helper functions to convert
Expand Down
2 changes: 1 addition & 1 deletion app/forms/disk-attach.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useApiQuery, type ApiError } from '@oxide/api'

import { ComboboxField } from '~/components/form/fields/ComboboxField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'

const defaultValues = { name: '' }

Expand Down
2 changes: 1 addition & 1 deletion app/forms/disk-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { ListboxField } from '~/components/form/fields/ListboxField'
import { NameField } from '~/components/form/fields/NameField'
import { RadioField } from '~/components/form/fields/RadioField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { FormDivider } from '~/ui/lib/Divider'
import { FieldLabel } from '~/ui/lib/FieldLabel'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/firewall-rules-common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { NameField } from '~/components/form/fields/NameField'
import { NumberField } from '~/components/form/fields/NumberField'
import { RadioField } from '~/components/form/fields/RadioField'
import { TextField, TextFieldInner } from '~/components/form/fields/TextField'
import { useVpcSelector } from '~/hooks'
import { useVpcSelector } from '~/hooks/use-params'
import { Badge } from '~/ui/lib/Badge'
import { Button } from '~/ui/lib/Button'
import { FormDivider } from '~/ui/lib/Divider'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/firewall-rules-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '@oxide/api'

import { SideModalForm } from '~/components/form/SideModalForm'
import { getVpcSelector, useVpcSelector } from '~/hooks'
import { getVpcSelector, useVpcSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { pb } from '~/util/path-builder'

Expand Down
6 changes: 5 additions & 1 deletion app/forms/firewall-rules-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ import {

import { trigger404 } from '~/components/ErrorBoundary'
import { SideModalForm } from '~/components/form/SideModalForm'
import { getFirewallRuleSelector, useFirewallRuleSelector, useVpcSelector } from '~/hooks'
import {
getFirewallRuleSelector,
useFirewallRuleSelector,
useVpcSelector,
} from '~/hooks/use-params'
import { invariant } from '~/util/invariant'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/floating-ip-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { ListboxField } from '~/components/form/fields/ListboxField'
import { NameField } from '~/components/form/fields/NameField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { Badge } from '~/ui/lib/Badge'
import { Message } from '~/ui/lib/Message'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/floating-ip-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { getFloatingIpSelector, useFloatingIpSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { getFloatingIpSelector, useFloatingIpSelector } from 'app/hooks'
import { pb } from 'app/util/path-builder'

EditFloatingIpSideModalForm.loader = async ({ params }: LoaderFunctionArgs) => {
Expand Down
2 changes: 1 addition & 1 deletion app/forms/idp/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { FileField } from '~/components/form/fields/FileField'
import { NameField } from '~/components/form/fields/NameField'
import { TextField } from '~/components/form/fields/TextField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useSiloSelector } from '~/hooks'
import { useSiloSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { readBlobAsBase64 } from '~/util/file'
import { pb } from '~/util/path-builder'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/idp/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { TextField } from '~/components/form/fields/TextField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { getIdpSelector, useIdpSelector } from '~/hooks'
import { getIdpSelector, useIdpSelector } from '~/hooks/use-params'
import { DateTime } from '~/ui/lib/DateTime'
import { PropertiesTable } from '~/ui/lib/PropertiesTable'
import { ResourceLabel } from '~/ui/lib/SideModal'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/image-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
getSiloImageSelector,
useProjectImageSelector,
useSiloImageSelector,
} from '~/hooks'
} from '~/hooks/use-params'
import { DateTime } from '~/ui/lib/DateTime'
import { PropertiesTable } from '~/ui/lib/PropertiesTable'
import { ResourceLabel } from '~/ui/lib/SideModal'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/image-from-snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { TextField } from '~/components/form/fields/TextField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { getProjectSnapshotSelector, useProjectSnapshotSelector } from '~/hooks'
import { getProjectSnapshotSelector, useProjectSnapshotSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { PropertiesTable } from '~/ui/lib/PropertiesTable'
import { pb } from '~/util/path-builder'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/image-upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { NameField } from '~/components/form/fields/NameField'
import { RadioField } from '~/components/form/fields/RadioField'
import { TextField } from '~/components/form/fields/TextField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'
import { Message } from '~/ui/lib/Message'
import { Modal } from '~/ui/lib/Modal'
import { Progress } from '~/ui/lib/Progress'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/instance-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { TextField } from '~/components/form/fields/TextField'
import { Form } from '~/components/form/Form'
import { FullPageForm } from '~/components/form/FullPageForm'
import { HL } from '~/components/HL'
import { getProjectSelector, useProjectSelector } from '~/hooks'
import { getProjectSelector, useProjectSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { Badge } from '~/ui/lib/Badge'
import { Button } from '~/ui/lib/Button'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/ip-pool-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { getIpPoolSelector, useIpPoolSelector } from '~/hooks'
import { getIpPoolSelector, useIpPoolSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/ip-pool-range-add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useApiMutation, useApiQueryClient, type IpRange } from '@oxide/api'

import { TextField } from '~/components/form/fields/TextField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useIpPoolSelector } from '~/hooks'
import { useIpPoolSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { Message } from '~/ui/lib/Message'
import { pb } from '~/util/path-builder'
Expand Down
2 changes: 1 addition & 1 deletion app/forms/network-interface-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { NameField } from '~/components/form/fields/NameField'
import { SubnetListbox } from '~/components/form/fields/SubnetListbox'
import { TextField } from '~/components/form/fields/TextField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'
import { FormDivider } from '~/ui/lib/Divider'

const defaultValues: InstanceNetworkInterfaceCreate = {
Expand Down
2 changes: 1 addition & 1 deletion app/forms/network-interface-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useInstanceSelector } from '~/hooks'
import { useInstanceSelector } from '~/hooks/use-params'

type EditNetworkInterfaceFormProps = {
editing: InstanceNetworkInterface
Expand Down
2 changes: 1 addition & 1 deletion app/forms/project-access.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {

import { ListboxField } from '~/components/form/fields/ListboxField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'

import {
actorToItem,
Expand Down
3 changes: 1 addition & 2 deletions app/forms/project-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ import {
import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { getProjectSelector, useProjectSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { pb } from '~/util/path-builder'

import { getProjectSelector, useProjectSelector } from '../hooks'

EditProjectSideModalForm.loader = async ({ params }: LoaderFunctionArgs) => {
const { project } = getProjectSelector(params)
await apiQueryClient.prefetchQuery('projectView', { path: { project } })
Expand Down
2 changes: 1 addition & 1 deletion app/forms/snapshot-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { ComboboxField } from '~/components/form/fields/ComboboxField'
import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/subnet-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
useCustomRouterItems,
} from '~/components/form/fields/useItemsList'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useVpcSelector } from '~/hooks'
import { useVpcSelector } from '~/hooks/use-params'
import { FormDivider } from '~/ui/lib/Divider'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/subnet-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
useCustomRouterItems,
} from '~/components/form/fields/useItemsList'
import { SideModalForm } from '~/components/form/SideModalForm'
import { getVpcSubnetSelector, useVpcSubnetSelector } from '~/hooks'
import { getVpcSubnetSelector, useVpcSubnetSelector } from '~/hooks/use-params'
import { FormDivider } from '~/ui/lib/Divider'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/vpc-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { TextField } from '~/components/form/fields/TextField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useProjectSelector } from '~/hooks'
import { useProjectSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/vpc-router-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useApiMutation, useApiQueryClient, type VpcRouterCreate } from '@oxide/
import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { useVpcSelector } from '~/hooks'
import { useVpcSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/vpc-router-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
import { DescriptionField } from '~/components/form/fields/DescriptionField'
import { NameField } from '~/components/form/fields/NameField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { getVpcRouterSelector, useVpcRouterSelector } from '~/hooks'
import { getVpcRouterSelector, useVpcRouterSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/vpc-router-route-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { NameField } from '~/components/form/fields/NameField'
import { TextField } from '~/components/form/fields/TextField'
import { SideModalForm } from '~/components/form/SideModalForm'
import { fields, targetValueDescription } from '~/forms/vpc-router-route/shared'
import { useVpcRouterSelector } from '~/hooks'
import { useVpcRouterSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/forms/vpc-router-route-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
routeFormMessage,
targetValueDescription,
} from '~/forms/vpc-router-route/shared'
import { getVpcRouterRouteSelector, useVpcRouterRouteSelector } from '~/hooks'
import { getVpcRouterRouteSelector, useVpcRouterRouteSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { Message } from '~/ui/lib/Message'
import { pb } from '~/util/path-builder'
Expand Down
13 changes: 0 additions & 13 deletions app/hooks/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion app/layouts/AuthenticatedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Outlet } from 'react-router-dom'

import { apiQueryClient, useApiQueryErrorsAllowed, usePrefetchedApiQuery } from '@oxide/api'

import { QuickActions } from '~/hooks'
import { QuickActions } from '~/hooks/use-quick-actions'
import { invariant } from '~/util/invariant'

/**
Expand Down
3 changes: 2 additions & 1 deletion app/layouts/ProjectLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ import {
VpcPicker,
VpcRouterPicker,
} from '~/components/TopBarPicker'
import { getProjectSelector, useProjectSelector, useQuickActions } from '~/hooks'
import { getProjectSelector, useProjectSelector } from '~/hooks/use-params'
import { useQuickActions } from '~/hooks/use-quick-actions'
import { Divider } from '~/ui/lib/Divider'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/layouts/SettingsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Folder16Icon, Key16Icon, Profile16Icon } from '@oxide/design-system/ico

import { TopBar } from '~/components/TopBar'
import { SiloSystemPicker } from '~/components/TopBarPicker'
import { useQuickActions } from '~/hooks'
import { useQuickActions } from '~/hooks/use-quick-actions'
import { Divider } from '~/ui/lib/Divider'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/layouts/SiloLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { DocsLinkItem, NavLinkItem, Sidebar } from '~/components/Sidebar'
import { TopBar } from '~/components/TopBar'
import { ProjectPicker, SiloSystemPicker } from '~/components/TopBarPicker'
import { useQuickActions } from '~/hooks'
import { useQuickActions } from '~/hooks/use-quick-actions'
import { Divider } from '~/ui/lib/Divider'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/layouts/SystemLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { trigger404 } from '~/components/ErrorBoundary'
import { DocsLinkItem, NavLinkItem, Sidebar } from '~/components/Sidebar'
import { TopBar } from '~/components/TopBar'
import { IpPoolPicker, SiloPicker, SiloSystemPicker } from '~/components/TopBarPicker'
import { useQuickActions } from '~/hooks'
import { useQuickActions } from '~/hooks/use-quick-actions'
import { Divider } from '~/ui/lib/Divider'
import { pb } from '~/util/path-builder'

Expand Down
2 changes: 1 addition & 1 deletion app/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { queryClient } from '@oxide/api'

import { ConfirmActionModal } from './components/ConfirmActionModal'
import { ErrorBoundary } from './components/ErrorBoundary'
import { ReduceMotion } from './hooks'
import { ReduceMotion } from './hooks/use-reduce-motion'
// stripped out by rollup in production
import { startMockAPI } from './msw-mock-api'
import { routes } from './routes'
Expand Down
3 changes: 1 addition & 2 deletions app/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ import { useNavigate, useSearchParams } from 'react-router-dom'
import { useApiMutation, type UsernamePasswordCredentials } from '@oxide/api'

import { TextFieldInner } from '~/components/form/fields/TextField'
import { useSiloSelector } from '~/hooks/use-params'
import { addToast } from '~/stores/toast'
import { Button } from '~/ui/lib/Button'
import { Identicon } from '~/ui/lib/Identicon'
import { pb } from '~/util/path-builder'

import { useSiloSelector } from '../hooks'

const defaultValues: UsernamePasswordCredentials = {
username: '',
password: '',
Expand Down
Loading

0 comments on commit 03b4b99

Please sign in to comment.