-
{row.title}
- {row.component}
+
+
+
+
+
Your Safe preview
- ))}
-
+ {rows?.map((row) => (
+
+ {row.title}
+ {row.component}
+
+ ))}
+
+
)
}
diff --git a/src/components/new-safe/steps/Step1/index.tsx b/src/components/new-safe/steps/Step1/index.tsx
index 62f44698ff..38bb93cda7 100644
--- a/src/components/new-safe/steps/Step1/index.tsx
+++ b/src/components/new-safe/steps/Step1/index.tsx
@@ -11,16 +11,15 @@ import {
Grid,
} from '@mui/material'
import { useForm } from 'react-hook-form'
-
import { useMnemonicSafeName } from '@/hooks/useMnemonicName'
import InfoIcon from '@/public/images/notifications/info.svg'
-
-import css from './styles.module.css'
import NetworkSelector from '@/components/common/NetworkSelector'
import type { StepRenderProps } from '../../CardStepper/useCardStepper'
import type { NewSafeFormData } from '../../CreateSafe'
import useCreateSafe from '@/components/new-safe/CreateSafe/useCreateSafe'
+import css from './styles.module.css'
+
type CreateSafeStep1Form = {
name: string
}
@@ -31,7 +30,12 @@ enum CreateSafeStep1Fields {
const STEP_1_FORM_ID = 'create-safe-step-1-form'
-function CreateSafeStep1({ data, onSubmit, onBack }: StepRenderProps
) {
+function CreateSafeStep1({
+ data,
+ onSubmit,
+ onBack,
+ setSafeName,
+}: StepRenderProps & { setSafeName: (name: string) => void }) {
const fallbackName = useMnemonicSafeName()
const { isConnected } = useCreateSafe()
@@ -46,8 +50,14 @@ function CreateSafeStep1({ data, onSubmit, onBack }: StepRenderProps) => {
+ const name = data.name || fallbackName
+ setSafeName(name)
+ onSubmit({ ...data, name })
+ }
+
return (
-