Skip to content

Commit f2d44df

Browse files
committed
cookie row and cookie cell typescript update
1 parent 5a5d365 commit f2d44df

File tree

5 files changed

+42
-47
lines changed

5 files changed

+42
-47
lines changed

src/client/components/display/CookieTable.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import CookieTableRow from './CookieTableRow.jsx'
2+
import {CookieTableRow} from './CookieTableRow'
33

44
class CookieTable extends Component {
55
constructor(props) {

src/client/components/display/CookieTableCell.jsx

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as React from "react";
2+
3+
export class CookieTableCell extends React.Component<any, any> {
4+
constructor(props: any) {
5+
super(props);
6+
this.state = {};
7+
}
8+
9+
render() {
10+
return (
11+
<div className="cookieTableCell">{this.props.detail.toString()}</div>
12+
);
13+
}
14+
}
15+
16+
//export default CookieTableCell;

src/client/components/display/CookieTableRow.jsx

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import * as React from "react";
2+
import { CookieTableCell } from "./CookieTableCell";
3+
import { any } from "prop-types";
4+
5+
export class CookieTableRow extends React.Component<any, any> {
6+
constructor(props: any) {
7+
super(props);
8+
this.state = {};
9+
}
10+
11+
render() {
12+
let tableCellArray: any[] = [];
13+
for (const key in this.props.cookie) {
14+
tableCellArray.push(
15+
<CookieTableCell detail={this.props.cookie[key]} key={key} />
16+
);
17+
}
18+
if (!this.props.cookie.expirationDate) {
19+
tableCellArray.push(<CookieTableCell detail="" key="expirationDate" />);
20+
}
21+
return <div className="cookieTableRow grid-9">{tableCellArray}</div>;
22+
}
23+
}
24+
25+
//export default CookieTableRow;

0 commit comments

Comments
 (0)