fix(embed): 📝 Improve popup delay builder
This commit is contained in:
@ -81,7 +81,7 @@ const StandardInstructions = ({ publicId }: Pick<ModalProps, 'publicId'>) => {
|
||||
}
|
||||
|
||||
const PopupInstructions = () => {
|
||||
const [inputValue, setInputValue] = useState(0)
|
||||
const [inputValue, setInputValue] = useState<number>()
|
||||
|
||||
return (
|
||||
<OrderedList spacing={2} mb={4}>
|
||||
@ -95,7 +95,7 @@ const PopupInstructions = () => {
|
||||
Paste the code below:
|
||||
<PopupEmbedSettings
|
||||
my={4}
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay ?? 0)}
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay)}
|
||||
/>
|
||||
<PopupEmbedCode delay={inputValue} />
|
||||
</ListItem>
|
||||
|
@ -48,7 +48,7 @@ const StandardInstructions = () => {
|
||||
}
|
||||
|
||||
const PopupInstructions = () => {
|
||||
const [inputValue, setInputValue] = useState(0)
|
||||
const [inputValue, setInputValue] = useState<number>()
|
||||
|
||||
return (
|
||||
<Stack spacing={4}>
|
||||
@ -57,7 +57,7 @@ const PopupInstructions = () => {
|
||||
</Text>
|
||||
<PopupEmbedSettings
|
||||
mb={4}
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay ?? 0)}
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay)}
|
||||
/>
|
||||
<PopupEmbedCode delay={inputValue} />
|
||||
</Stack>
|
||||
|
@ -33,7 +33,7 @@ export const NotionModal = ({
|
||||
</ModalHeader>
|
||||
<ModalCloseButton />
|
||||
<ModalBody>
|
||||
{!isPublished && <PublishFirstInfo />}
|
||||
{!isPublished && <PublishFirstInfo mb="4" />}
|
||||
<OrderedList spacing={3}>
|
||||
<ListItem>
|
||||
Type <Tag>/embed</Tag>
|
||||
|
@ -48,13 +48,13 @@ const StandardInstructions = () => {
|
||||
}
|
||||
|
||||
const PopupInstructions = () => {
|
||||
const [inputValue, setInputValue] = useState(0)
|
||||
const [inputValue, setInputValue] = useState<number>()
|
||||
|
||||
return (
|
||||
<Stack spacing={4}>
|
||||
<InstallPackageInstruction />
|
||||
<PopupEmbedSettings
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay ?? 0)}
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay)}
|
||||
/>
|
||||
<Text>Initialize the typebot</Text>
|
||||
<PopupReactCode withStarterVariables={true} delay={inputValue} />
|
||||
|
@ -96,7 +96,7 @@ const StandardInstructions = ({ publicId }: Pick<ModalProps, 'publicId'>) => {
|
||||
}
|
||||
|
||||
const PopupInstructions = () => {
|
||||
const [inputValue, setInputValue] = useState(0)
|
||||
const [inputValue, setInputValue] = useState<number>()
|
||||
|
||||
return (
|
||||
<OrderedList spacing={2} mb={4}>
|
||||
@ -109,7 +109,7 @@ const PopupInstructions = () => {
|
||||
before the closing <Tag>head</Tag> tag:
|
||||
<PopupEmbedSettings
|
||||
my="4"
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay ?? 0)}
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay)}
|
||||
/>
|
||||
<PopupEmbedCode delay={inputValue} />
|
||||
</ListItem>
|
||||
|
@ -41,7 +41,7 @@ const StandardInstructions = () => (
|
||||
)
|
||||
|
||||
const PopupInstructions = () => {
|
||||
const [inputValue, setInputValue] = useState(0)
|
||||
const [inputValue, setInputValue] = useState<number>()
|
||||
|
||||
return (
|
||||
<OrderedList spacing={2} mb={4}>
|
||||
@ -52,7 +52,7 @@ const PopupInstructions = () => {
|
||||
Add an <Tag>embed</Tag> element from the <Tag>components</Tag>
|
||||
section and paste this code:
|
||||
<PopupEmbedSettings
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay ?? 0)}
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay)}
|
||||
my={4}
|
||||
/>
|
||||
<PopupEmbedCode delay={inputValue} mt={4} />
|
||||
|
@ -43,7 +43,7 @@ const StandardInstructions = () => {
|
||||
}
|
||||
|
||||
const PopupInstructions = () => {
|
||||
const [inputValue, setInputValue] = useState(0)
|
||||
const [inputValue, setInputValue] = useState<number>()
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -60,7 +60,7 @@ const PopupInstructions = () => {
|
||||
<ListItem>
|
||||
Paste this snippet in the code box:
|
||||
<PopupEmbedSettings
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay ?? 0)}
|
||||
onUpdateSettings={(settings) => setInputValue(settings.delay)}
|
||||
my={4}
|
||||
/>
|
||||
<PopupEmbedCode delay={inputValue} />
|
||||
|
Reference in New Issue
Block a user