@@ -12,8 +12,9 @@ import { Link, Outlet, type LoaderFunctionArgs } from 'react-router-dom'
12
12
import { apiQueryClient , useApiMutation , useApiQueryClient , type Image } from '@oxide/api'
13
13
import { Images24Icon } from '@oxide/design-system/icons/react'
14
14
15
- import { getProjectSelector , useProjectSelector , useToast } from '~/hooks'
15
+ import { getProjectSelector , useProjectSelector } from '~/hooks'
16
16
import { confirmDelete } from '~/stores/confirm-delete'
17
+ import { addToast } from '~/stores/toast'
17
18
import { makeLinkCell } from '~/table/cells/LinkCell'
18
19
import { getActionsCol , type MenuAction } from '~/table/columns/action-col'
19
20
import { Columns } from '~/table/columns/common'
@@ -50,7 +51,6 @@ export function ImagesPage() {
50
51
const { project } = useProjectSelector ( )
51
52
const { Table } = useQueryTable ( 'imageList' , { query : { project } } )
52
53
const queryClient = useApiQueryClient ( )
53
- const addToast = useToast ( )
54
54
55
55
const [ promoteImageName , setPromoteImageName ] = useState < string | null > ( null )
56
56
@@ -121,7 +121,7 @@ type PromoteModalProps = { onDismiss: () => void; imageName: string }
121
121
const PromoteImageModal = ( { onDismiss, imageName } : PromoteModalProps ) => {
122
122
const { project } = useProjectSelector ( )
123
123
const queryClient = useApiQueryClient ( )
124
- const addToast = useToast ( )
124
+
125
125
const promoteImage = useApiMutation ( 'imagePromote' , {
126
126
onSuccess ( data ) {
127
127
addToast ( {
0 commit comments