1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #3433 from dmitrylyzo/types-react

[TypeScript] Disable implicit any
This commit is contained in:
Bill Thornton 2022-02-25 15:17:32 -05:00 committed by GitHub
commit bb46b32402
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 883 additions and 254 deletions

View file

@ -2,7 +2,7 @@ import React, { FunctionComponent } from 'react';
import datetime from '../../../scripts/datetime';
import globalize from '../../../scripts/globalize';
const createButtonElement = ({index}) => ({
const createButtonElement = (index: number) => ({
__html: `<button
type='button'
is='paper-icon-button-light'
@ -21,7 +21,7 @@ type IProps = {
EndHour?: number;
}
function getDisplayTime(hours) {
function getDisplayTime(hours = 0) {
let minutes = 0;
const pct = hours % 1;
@ -49,9 +49,7 @@ const AccessScheduleList: FunctionComponent<IProps> = ({index, DayOfWeek, StartH
</div>
</div>
<div
dangerouslySetInnerHTML={createButtonElement({
index: index
})}
dangerouslySetInnerHTML={createButtonElement(index)}
/>
</div>
);