Skip to content

Commit b91ea12

Browse files
committed
4565: Removed prop types
1 parent c768f35 commit b91ea12

File tree

9 files changed

+0
-61
lines changed

9 files changed

+0
-61
lines changed

assets/client/app.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useEffect, useRef, useState } from "react";
2-
import PropTypes from "prop-types";
32
import Screen from "./components/screen.jsx";
43
import ContentService from "./service/content-service";
54
import ClientConfigLoader from "./util/client-config-loader.js";
@@ -287,9 +286,4 @@ function App({ preview, previewId }) {
287286
);
288287
}
289288

290-
App.propTypes = {
291-
preview: PropTypes.string,
292-
previewId: PropTypes.string,
293-
};
294-
295289
export default App;

assets/client/components/error-boundary.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component } from "react";
2-
import PropTypes from "prop-types";
32
import logger from "../logger/logger";
43
import fallback from "../assets/fallback.png";
54
import "./error-boundary.scss";
@@ -52,9 +51,4 @@ class ErrorBoundary extends Component {
5251
}
5352
}
5453

55-
ErrorBoundary.propTypes = {
56-
children: PropTypes.node.isRequired,
57-
errorHandler: PropTypes.func,
58-
};
59-
6054
export default ErrorBoundary;

assets/client/components/region.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { React, useEffect, useState, createRef } from "react";
2-
import PropTypes from "prop-types";
32
import "./region.scss";
43
import { createGridArea } from "../../shared/grid-generator/grid-generator";
54
import { TransitionGroup, CSSTransition } from "react-transition-group";
@@ -206,11 +205,4 @@ function Region({ region }) {
206205
);
207206
}
208207

209-
Region.propTypes = {
210-
region: PropTypes.shape({
211-
"@id": PropTypes.string.isRequired,
212-
gridArea: PropTypes.arrayOf(PropTypes.string.isRequired),
213-
}).isRequired,
214-
};
215-
216208
export default Region;

assets/client/components/screen.jsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Fragment, React, useEffect, useRef } from "react";
2-
import PropTypes from "prop-types";
32
import SunCalc from "suncalc";
43
import { createGrid } from "../../shared/grid-generator/grid-generator";
54
import Region from "./region.jsx";
@@ -111,23 +110,4 @@ function Screen({ screen }) {
111110
);
112111
}
113112

114-
Screen.propTypes = {
115-
screen: PropTypes.shape({
116-
"@id": PropTypes.string.isRequired,
117-
layoutData: PropTypes.shape({
118-
grid: PropTypes.shape({
119-
columns: PropTypes.number.isRequired,
120-
rows: PropTypes.number.isRequired,
121-
}),
122-
regions: PropTypes.arrayOf(
123-
PropTypes.shape({
124-
"@id": PropTypes.string.isRequired,
125-
// @TODO: Expand prop type.
126-
})
127-
),
128-
}).isRequired,
129-
enableColorSchemeChange: PropTypes.bool,
130-
}).isRequired,
131-
};
132-
133113
export default Screen;

assets/client/components/touch-region.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { React, useEffect, useState, createRef } from "react";
2-
import PropTypes from "prop-types";
32
import "./touch-region.scss";
43
import { createGridArea } from "../../shared/grid-generator/grid-generator";
54
import ErrorBoundary from "./error-boundary.jsx";
@@ -191,11 +190,4 @@ function TouchRegion({ region }) {
191190
);
192191
}
193192

194-
TouchRegion.propTypes = {
195-
region: PropTypes.shape({
196-
"@id": PropTypes.string.isRequired,
197-
gridArea: PropTypes.arrayOf(PropTypes.string.isRequired),
198-
}).isRequired,
199-
};
200-
201193
export default TouchRegion;

assets/shared/slide-utils/slide-util.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { createGlobalStyle } from "styled-components";
22
import React from "react";
3-
import PropTypes from "prop-types";
43

54
/**
65
* Get the first media url of a media field.
@@ -67,9 +66,4 @@ function ThemeStyles({ id, css = null }) {
6766
return <ThemeComponent />;
6867
}
6968

70-
ThemeStyles.propTypes = {
71-
id: PropTypes.string.isRequired,
72-
css: PropTypes.string,
73-
};
74-
7569
export { getAllMediaUrlsFromField, getFirstMediaUrlFromField, ThemeStyles };

assets/template/index.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
Routes,
1313
useParams,
1414
} from "react-router-dom";
15-
import PropTypes from "prop-types";
1615
import { renderSlide } from "../shared/slide-utils/templates.js";
1716
import slideFixtures from "./fixtures/slide-fixtures.js";
1817
import screenFixtures from "./fixtures/screen-fixtures.js";
@@ -122,10 +121,6 @@ export const Screen = ({screen}) => {
122121
return <div className="app">{screen && renderScreen(screen)}</div>;
123122
};
124123

125-
Screen.propTypes = {
126-
screen: PropTypes.shape({}).isRequired,
127-
};
128-
129124
export const Overview = () => {
130125
return (
131126
<div style={{margin: "2em"}}>

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"lodash.set": "^4.3.2",
4444
"lodash.uniqwith": "^4.5.0",
4545
"pino": "^9.1.0",
46-
"prop-types": "^15.7.2",
4746
"qrcode": "^1.5.4",
4847
"query-string": "^7.1.1",
4948
"react": "^18.2.0",

0 commit comments

Comments
 (0)