import React, { useContext } from 'react'; import { Link } from 'react-router-dom'; import axios from 'axios'; import { Card, Accordion, Col, AccordionContext, useAccordionToggle, Button } from 'react-bootstrap'; import styled from 'styled-components'; const Text = styled(Card.Body)` & .WRAP { display: inline-block; text-overflow: ellipsis; width: 100%; white-space: initial; } ` function Notice({ card_id, card_index, title, date, content, admin, remove }) { function ContextAwareToggle({ children, eventKey, callback }) { const currentEventKey = useContext(AccordionContext); const decoratedOnClick = useAccordionToggle( eventKey, () => callback && callback(eventKey), ); const isCurrentEventKey = currentEventKey === eventKey; return (