Components to show cookie and header results

This commit is contained in:
Alicia Sykes
2023-06-21 14:29:20 +01:00
parent 14432c665b
commit 2a7a5fa0f9
5 changed files with 92 additions and 33 deletions

View File

@@ -0,0 +1,31 @@
import styled from 'styled-components';
import colors from 'styles/colors';
import Card from 'components/Form/Card';
import Heading from 'components/Form/Heading';
import Row, { ExpandableRow } from 'components/Form/Row';
const Outer = styled(Card)``;
const CookiesCard = (props: { cookies: any }): JSX.Element => {
const cookies = props.cookies;
console.log('COOKIES: ', cookies);
return (
<Outer>
<Heading as="h3" size="small" align="left" color={colors.primary}>Cookies</Heading>
{/* { subject && <DataRow lbl="Subject" val={subject?.CN} /> } */}
{
cookies.map((cookie: any, index: number) => {
const attributes = Object.keys(cookie.attributes).map((key: string) => {
return { lbl: key, val: cookie.attributes[key] }
});
return (
<ExpandableRow key={`cookie-${index}`} lbl={cookie.name} val={cookie.value} rowList={attributes} />
)
})
}
</Outer>
);
}
export default CookiesCard;