fix(TALE-6): make menu dropdown actions available on machines page
This commit is contained in:
parent
be8ce7a2fe
commit
dca5f9d149
3 changed files with 78 additions and 63 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { type LoaderFunctionArgs } from '@remix-run/node'
|
||||
import { ActionFunctionArgs, type LoaderFunctionArgs } from '@remix-run/node'
|
||||
import { Link, useLoaderData } from '@remix-run/react'
|
||||
|
||||
import Attribute from '~/components/Attribute'
|
||||
|
|
@ -12,6 +12,7 @@ import { pull } from '~/utils/headscale'
|
|||
import { getSession } from '~/utils/sessions'
|
||||
import { useLiveData } from '~/utils/useLiveData'
|
||||
|
||||
import { menuAction } from './_data.machines._index/action'
|
||||
import MenuOptions from './_data.machines._index/menu'
|
||||
|
||||
export async function loader({ request, params }: LoaderFunctionArgs) {
|
||||
|
|
@ -44,6 +45,10 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function action({ request }: ActionFunctionArgs) {
|
||||
return menuAction(request)
|
||||
}
|
||||
|
||||
export default function Page() {
|
||||
const { machine, magic, routes } = useLoaderData<typeof loader>()
|
||||
useLiveData({ interval: 1000 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue