@@ -19,6 +19,7 @@ import {
1919
2020import { SideModalForm } from '~/components/form/SideModalForm'
2121import { HL } from '~/components/HL'
22+ import { titleCrumb } from '~/hooks/use-crumbs'
2223import { getVpcSelector , useVpcSelector } from '~/hooks/use-params'
2324import { addToast } from '~/stores/toast'
2425import { ALL_ISH } from '~/util/consts'
@@ -27,6 +28,8 @@ import { pb } from '~/util/path-builder'
2728import { CommonFields } from './firewall-rules-common'
2829import { valuesToRuleUpdate , type FirewallRuleValues } from './firewall-rules-util'
2930
31+ export const handle = titleCrumb ( 'New Rule' )
32+
3033/** Empty form for when we're not creating from an existing rule */
3134const defaultValuesEmpty : FirewallRuleValues = {
3235 enabled : true ,
@@ -55,7 +58,7 @@ const ruleToValues = (rule: VpcFirewallRule): FirewallRuleValues => ({
5558 hosts : rule . filters . hosts || [ ] ,
5659} )
5760
58- CreateFirewallRuleForm . loader = async ( { params } : LoaderFunctionArgs ) => {
61+ export async function clientLoader ( { params } : LoaderFunctionArgs ) {
5962 const { project, vpc } = getVpcSelector ( params )
6063 await Promise . all ( [
6164 apiQueryClient . prefetchQuery ( 'vpcFirewallRulesView' , { query : { project, vpc } } ) ,
@@ -69,7 +72,7 @@ CreateFirewallRuleForm.loader = async ({ params }: LoaderFunctionArgs) => {
6972 return null
7073}
7174
72- export function CreateFirewallRuleForm ( ) {
75+ export default function CreateFirewallRuleForm ( ) {
7376 const vpcSelector = useVpcSelector ( )
7477 const queryClient = useApiQueryClient ( )
7578
0 commit comments