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

@ -1,10 +1,11 @@
import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
import React, { FunctionComponent } from 'react';
import { formatDistanceToNow } from 'date-fns';
import { localeWithSuffix } from '../../../scripts/dfnshelper';
import globalize from '../../../scripts/globalize';
import cardBuilder from '../../cardbuilder/cardBuilder';
const createLinkElement = ({ user, renderImgUrl }) => ({
const createLinkElement = ({ user, renderImgUrl }: { user: UserDto, renderImgUrl: string }) => ({
__html: `<a
is="emby-linkbutton"
class="cardContent"
@ -28,7 +29,7 @@ type IProps = {
user?: Record<string, any>;
}
const getLastSeenText = (lastActivityDate) => {
const getLastSeenText = (lastActivityDate?: string) => {
if (lastActivityDate) {
return globalize.translate('LastSeen', formatDistanceToNow(Date.parse(lastActivityDate), localeWithSuffix));
}