add prettier
This commit is contained in:
@@ -8,48 +8,31 @@ import { StyledInput } from '../styled'
|
||||
import { useModalSearchParams } from '@/hooks/useModalSearchParams'
|
||||
|
||||
type UserValueSectionProps = {
|
||||
title: string
|
||||
value: string
|
||||
explanationType: EXPLANATION_MODAL_KEYS
|
||||
copyValue: string
|
||||
title: string
|
||||
value: string
|
||||
explanationType: EXPLANATION_MODAL_KEYS
|
||||
copyValue: string
|
||||
}
|
||||
|
||||
const UserValueSection: FC<UserValueSectionProps> = ({
|
||||
title,
|
||||
value,
|
||||
explanationType,
|
||||
copyValue,
|
||||
}) => {
|
||||
const { handleOpen } = useModalSearchParams()
|
||||
const UserValueSection: FC<UserValueSectionProps> = ({ title, value, explanationType, copyValue }) => {
|
||||
const { handleOpen } = useModalSearchParams()
|
||||
|
||||
const handleOpenExplanationModal = (type: EXPLANATION_MODAL_KEYS) => {
|
||||
handleOpen(MODAL_PARAMS_KEYS.EXPLANATION, {
|
||||
search: {
|
||||
type,
|
||||
},
|
||||
})
|
||||
}
|
||||
return (
|
||||
<Box>
|
||||
<Stack
|
||||
direction={'row'}
|
||||
alignItems={'center'}
|
||||
justifyContent={'space-between'}
|
||||
marginBottom={'0.5rem'}
|
||||
>
|
||||
<SectionTitle>{title}</SectionTitle>
|
||||
<AppLink
|
||||
title='What is this?'
|
||||
onClick={() => handleOpenExplanationModal(explanationType)}
|
||||
/>
|
||||
</Stack>
|
||||
<StyledInput
|
||||
value={value}
|
||||
readOnly
|
||||
endAdornment={<InputCopyButton value={copyValue} />}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
const handleOpenExplanationModal = (type: EXPLANATION_MODAL_KEYS) => {
|
||||
handleOpen(MODAL_PARAMS_KEYS.EXPLANATION, {
|
||||
search: {
|
||||
type,
|
||||
},
|
||||
})
|
||||
}
|
||||
return (
|
||||
<Box>
|
||||
<Stack direction={'row'} alignItems={'center'} justifyContent={'space-between'} marginBottom={'0.5rem'}>
|
||||
<SectionTitle>{title}</SectionTitle>
|
||||
<AppLink title="What is this?" onClick={() => handleOpenExplanationModal(explanationType)} />
|
||||
</Stack>
|
||||
<StyledInput value={value} readOnly endAdornment={<InputCopyButton value={copyValue} />} />
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
export default UserValueSection
|
||||
|
||||
Reference in New Issue
Block a user