mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
🔥 remove: link in collapse title
:%s
This commit is contained in:
@@ -2,15 +2,13 @@ import s from './CollapseChild.module.scss'
|
||||
import { useState } from 'react'
|
||||
import classNames from 'classnames'
|
||||
import CollapseContent from './CollapseContent/CollapseContent'
|
||||
import Link from 'next/link'
|
||||
|
||||
interface CollapseProps{
|
||||
title?: string,
|
||||
content: Array<string>,
|
||||
isToggle?: boolean,
|
||||
link?: string,
|
||||
}
|
||||
const CollapseChild = ({title, content, isToggle=false, link="/"}: CollapseProps) => {
|
||||
const CollapseChild = ({title, content, isToggle=false}: CollapseProps) => {
|
||||
const [isActive, changeActive] = useState(isToggle)
|
||||
|
||||
const handleToggle = () => {
|
||||
@@ -24,9 +22,7 @@ const CollapseChild = ({title, content, isToggle=false, link="/"}: CollapseProps
|
||||
onClick = { handleToggle }
|
||||
>
|
||||
<div className={s.title}>
|
||||
<Link href={link}>
|
||||
<a>{title}</a>
|
||||
</Link>
|
||||
<h4>{title}</h4>
|
||||
<div className={s.toggle}></div>
|
||||
</div>
|
||||
<div className={s.contentContainer}>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import CollapseChild from './CollapseChild/CollapseChild'
|
||||
|
||||
interface CollapseCommonProps{
|
||||
data: {title: string, content: Array<string>, link: string}[],
|
||||
data: {title: string, content: Array<string>}[],
|
||||
}
|
||||
|
||||
const CollapseCommon = ({data}: CollapseCommonProps) => {
|
||||
@@ -9,7 +9,7 @@ const CollapseCommon = ({data}: CollapseCommonProps) => {
|
||||
<section>
|
||||
{
|
||||
data.map(item =>
|
||||
<CollapseChild key={item.title} title={item.title} content={item.content} link={item.link} />
|
||||
<CollapseChild key={item.title} title={item.title} content={item.content}/>
|
||||
)
|
||||
}
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user