Get rid of various errors.

new-frontend
Icedream 2023-01-09 07:49:37 +01:00
parent 3d5d6f665b
commit 1f71f8f74d
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
4 changed files with 20 additions and 8 deletions

View File

@ -85,11 +85,10 @@ class VideoList extends React.Component<VideoListProps, VideoListState> {
<Filter
items={videos}
query={query}
keys={['title', 'fileName']}
keys={['title']}
output={(filteredVideos) => filteredVideos.map(({
item: {
duration,
downloadFileName: fileName,
title,
run,
slug,
@ -106,7 +105,6 @@ class VideoList extends React.Component<VideoListProps, VideoListState> {
duration={duration}
id={id}
thumbnailServerURL={thumbnailServerURL}
fileName={fileName}
slug={slug}
title={title}
sourceVideoStart={sourceVideoStart}

View File

@ -15,8 +15,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { Spinner } from 'react-bootstrap';
import { FormattedMessage } from 'react-intl';
import WrapReactIntl from './WrapReactIntl';

View File

@ -67,7 +67,14 @@ interface VideoPlayerPageProps {
twitchPlayerParentKey?: string,
}
const getProps = withSession(async (req, _res, { id, vslug }: VideoPlayerPageParameters): Promise<GetServerSidePropsResult<VideoPlayerPageProps>> => {
const getProps = withSession(async (
req,
_res,
{
id,
vslug,
}: VideoPlayerPageParameters,
): Promise<GetServerSidePropsResult<VideoPlayerPageProps>> => {
if (typeof id !== 'string') {
throw new Error('only expected a single id');
}
@ -186,7 +193,9 @@ const getProps = withSession(async (req, _res, { id, vslug }: VideoPlayerPagePar
};
});
export const getServerSideProps: GetServerSideProps<VideoPlayerPageProps, VideoPlayerPageParameters> = async ({
type ServerSideProps = GetServerSideProps<VideoPlayerPageProps, VideoPlayerPageParameters>;
export const getServerSideProps: ServerSideProps = async ({
req,
res,
params,
@ -279,6 +288,7 @@ export default function VideoPlayerPage({
if (typeof downloadFileName === 'string' && downloadFileName.length > 0) {
tabs.push(
<Tab
key="mirror-player"
eventKey="mirror-player"
title={intl.formatMessage({
id: 'VideoPlayerPage.tab.mirrorPlayer',
@ -314,7 +324,11 @@ export default function VideoPlayerPage({
/>
</Tab>,
);
downloadButtons.push(<DownloadButton id={id} fileName={downloadFileName} />);
downloadButtons.push(<DownloadButton
key="download"
id={id}
fileName={getDownloadURL(id, downloadFileName)}
/>);
}
// Twitch tab

View File

@ -1,5 +1,7 @@
ARG NGINX_VERSION=1.20.1
# FIXME - 1.20.1 uses an Alpine version that ships a _pre version of gcc/libc, that confuses the icedream/nginx module build script. Has to be fixed in that repo instead.
FROM icedream/nginx as icedream-nginx
FROM nginx:${NGINX_VERSION}-alpine AS ffmpeg-build