@@ -19,6 +19,7 @@ import {
19
19
20
20
import { SideModalForm } from '~/components/form/SideModalForm'
21
21
import { HL } from '~/components/HL'
22
+ import { titleCrumb } from '~/hooks/use-crumbs'
22
23
import { getVpcSelector , useVpcSelector } from '~/hooks/use-params'
23
24
import { addToast } from '~/stores/toast'
24
25
import { ALL_ISH } from '~/util/consts'
@@ -27,6 +28,8 @@ import { pb } from '~/util/path-builder'
27
28
import { CommonFields } from './firewall-rules-common'
28
29
import { valuesToRuleUpdate , type FirewallRuleValues } from './firewall-rules-util'
29
30
31
+ export const handle = titleCrumb ( 'New Rule' )
32
+
30
33
/** Empty form for when we're not creating from an existing rule */
31
34
const defaultValuesEmpty : FirewallRuleValues = {
32
35
enabled : true ,
@@ -55,7 +58,7 @@ const ruleToValues = (rule: VpcFirewallRule): FirewallRuleValues => ({
55
58
hosts : rule . filters . hosts || [ ] ,
56
59
} )
57
60
58
- CreateFirewallRuleForm . loader = async ( { params } : LoaderFunctionArgs ) => {
61
+ export async function clientLoader ( { params } : LoaderFunctionArgs ) {
59
62
const { project, vpc } = getVpcSelector ( params )
60
63
await Promise . all ( [
61
64
apiQueryClient . prefetchQuery ( 'vpcFirewallRulesView' , { query : { project, vpc } } ) ,
@@ -69,7 +72,7 @@ CreateFirewallRuleForm.loader = async ({ params }: LoaderFunctionArgs) => {
69
72
return null
70
73
}
71
74
72
- export function CreateFirewallRuleForm ( ) {
75
+ export default function CreateFirewallRuleForm ( ) {
73
76
const vpcSelector = useVpcSelector ( )
74
77
const queryClient = useApiQueryClient ( )
75
78
0 commit comments