Color configre cleanup
This commit is contained in:
@@ -29,8 +29,8 @@ const ColorStyleConfigure = memo(({name = 'Full Name', data, productData}) => {
|
||||
})
|
||||
|
||||
const templateResponse = colorStyleCss?.data
|
||||
const currentTemUID = templateResponse?.current_template_uid
|
||||
const templates = templateResponse?.templates
|
||||
const currentColorUID = templateResponse?.current_colorstyle_uid
|
||||
const color_styles = templateResponse?.color_styles
|
||||
const custom_template_name = templateResponse?.custom_template_name
|
||||
|
||||
// console.log('data Template', templateResponse)
|
||||
@@ -105,25 +105,30 @@ const ColorStyleConfigure = memo(({name = 'Full Name', data, productData}) => {
|
||||
:
|
||||
<div className="row">
|
||||
<>
|
||||
{!templates?.length ?
|
||||
{!color_styles?.length ?
|
||||
<p>No data Found</p>
|
||||
:
|
||||
templates.map(color_style => (
|
||||
color_styles.map(color_style => (
|
||||
<div key={color_style.color_style_uid} className="col-xl-6 col-sm-6">
|
||||
<div className="card card-statistics">
|
||||
<div className="card-body">
|
||||
<div className="text-center p-2" style={{backgroundColor: `#${color_style.color_code}`}}>
|
||||
<div className="card-body" style={{
|
||||
backgroundColor: `#${color_style.color_code}`,
|
||||
opacity: '0.5',
|
||||
borderRadius: '10px'
|
||||
}}>
|
||||
<div className="text-center p-2">
|
||||
{/*<div className="mb-2">*/}
|
||||
{/* <img src={getImage('file-icon/svg.png')}*/}
|
||||
{/* alt={template.title}/>*/}
|
||||
{/*</div>*/}
|
||||
<h4 className="mb-0">{color_style.title}</h4>
|
||||
{currentTemUID === color_style.color_style_uid ?
|
||||
{currentColorUID === color_style.color_style_uid ?
|
||||
<button className="btn btn-light"
|
||||
disabled={true}>Active</button>
|
||||
:
|
||||
<button onClick={() => handleSubmit(color_style.color_style_uid)}
|
||||
className="btn btn-primary">Select</button>
|
||||
<button
|
||||
onClick={() => handleSubmit(color_style.color_style_uid)}
|
||||
className="btn btn-primary">Select</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user