From 65a74b3608a52abe2ae986b900b4b39b21a358ab Mon Sep 17 00:00:00 2001 From: lytrankieio123 Date: Wed, 8 Sep 2021 16:04:28 +0700 Subject: [PATCH] :fire: remove: link in collapse title :%s --- pages/test.tsx | 4 ---- .../common/CollapseCommon/CollapseChild/CollapseChild.tsx | 8 ++------ src/components/common/CollapseCommon/CollapseCommon.tsx | 4 ++-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/pages/test.tsx b/pages/test.tsx index 5afc61235..403bc7b9d 100644 --- a/pages/test.tsx +++ b/pages/test.tsx @@ -106,7 +106,6 @@ const COLLAPSE_DATA = [ "Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.", "This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.", ], - link: "/title" }, { title: "This is a subtitle", @@ -115,7 +114,6 @@ const COLLAPSE_DATA = [ "Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.", "This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.", ], - link: "/title" }, { title: "This is a subtitle", @@ -124,7 +122,6 @@ const COLLAPSE_DATA = [ "Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.", "This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.", ], - link: "/title" }, { title: "This is a subtitle", @@ -133,7 +130,6 @@ const COLLAPSE_DATA = [ "Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.", "This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.", ], - link: "/title" }, ] export default function Test() { diff --git a/src/components/common/CollapseCommon/CollapseChild/CollapseChild.tsx b/src/components/common/CollapseCommon/CollapseChild/CollapseChild.tsx index 22cbcda10..53cd70cf3 100644 --- a/src/components/common/CollapseCommon/CollapseChild/CollapseChild.tsx +++ b/src/components/common/CollapseCommon/CollapseChild/CollapseChild.tsx @@ -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, 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 } >
- - {title} - +

{title}

diff --git a/src/components/common/CollapseCommon/CollapseCommon.tsx b/src/components/common/CollapseCommon/CollapseCommon.tsx index 98030ffce..e695a6576 100644 --- a/src/components/common/CollapseCommon/CollapseCommon.tsx +++ b/src/components/common/CollapseCommon/CollapseCommon.tsx @@ -1,7 +1,7 @@ import CollapseChild from './CollapseChild/CollapseChild' interface CollapseCommonProps{ - data: {title: string, content: Array, link: string}[], + data: {title: string, content: Array}[], } const CollapseCommon = ({data}: CollapseCommonProps) => { @@ -9,7 +9,7 @@ const CollapseCommon = ({data}: CollapseCommonProps) => {
{ data.map(item => - + ) }