mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 07:26:18 -05:00
Handling situation where React Router may not be available for a Tag Label.
This commit is contained in:
parent
0920383963
commit
2cbc6e00e0
8 changed files with 56 additions and 33 deletions
|
|
@ -440,7 +440,7 @@ function ChannelRow({channel}) {
|
|||
|
||||
const {inverted} = React.useContext(ThemeContext);
|
||||
const editTo = `/videos/channel/${channel.id}/edit`;
|
||||
const buttonClass = `ui button secondary ${inverted ? 'inverted' : ''}`;
|
||||
const buttonClass = `ui button secondary ${inverted}`;
|
||||
|
||||
return <TableRow>
|
||||
<TableCell>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
import React from "react";
|
||||
import _ from "lodash";
|
||||
import {
|
||||
Grid,
|
||||
Header as SHeader,
|
||||
Image,
|
||||
} from "semantic-ui-react";
|
||||
import {TagsSelector} from "../Tags";
|
||||
import {Grid, Header as SHeader, Image,} from "semantic-ui-react";
|
||||
import {TagsProvider, TagsSelector} from "../Tags";
|
||||
import {Media} from "../contexts/contexts";
|
||||
import {encodeMediaPath} from "./Common";
|
||||
import {addTag, fetchFile, removeTag} from "../api";
|
||||
|
|
@ -152,7 +148,7 @@ export const FilePreviewContext = React.createContext({
|
|||
|
||||
const MAXIMUM_TEXT_SIZE = 5_000_000;
|
||||
|
||||
export function FilePreviewWrapper({children}) {
|
||||
export function FilePreviewProvider({children}) {
|
||||
const [previewFile, setPreviewFile] = React.useState(null);
|
||||
const [previewModal, setPreviewModal] = React.useState(null);
|
||||
const [callbacks, setCallbacks] = React.useState(null);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export const defaultTheme = lightTheme;
|
|||
export const systemTheme = 'system';
|
||||
export const themeSessionKey = 'color-scheme';
|
||||
|
||||
export function ThemeWrapper({children, ...props}) {
|
||||
export function ThemeProvider({children, ...props}) {
|
||||
if (!_.isEmpty(props)) {
|
||||
console.log(props);
|
||||
console.error('ThemeWrapper does not support props!');
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ function VideoPage({videoFile, prevFile, nextFile, fetchVideo, ...props}) {
|
|||
>
|
||||
<source src={videoUrl} type="video/mp4"/>
|
||||
{/* Only WebVTT captions can be displayed. */}
|
||||
{captionUrls.map(i => <track kind="captions" label="English" src={i} srcLang="en" default/>)}
|
||||
{captionUrls.map(i => <track key={i} kind="captions" label="English" src={i} srcLang="en" default/>)}
|
||||
</video>
|
||||
|
||||
<Container style={{marginTop: '1em'}}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue