mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-20 15:06:19 -05:00
Fetching tags globally every 30 seconds, rather than for each usage of Tags.
This commit is contained in:
parent
e9f820d483
commit
7a855b57cc
8 changed files with 30 additions and 41 deletions
|
|
@ -10,7 +10,7 @@ import {
|
|||
ModalContent,
|
||||
ModalHeader
|
||||
} from "semantic-ui-react";
|
||||
import {TagsProvider, TagsSelector} from "../Tags";
|
||||
import {TagsSelector} from "../Tags";
|
||||
import {Media} from "../contexts/contexts";
|
||||
import {encodeMediaPath} from "./Common";
|
||||
import {addTag, fetchFile, removeTag} from "../api";
|
||||
|
|
@ -201,9 +201,8 @@ export function FilePreviewWrapper({children}) {
|
|||
openButton = <SButton color='blue' as='a' href={url}>Open</SButton>;
|
||||
}
|
||||
const closeButton = <SButton onClick={handleClose}>Close</SButton>;
|
||||
const tagsDisplay = <TagsProvider>
|
||||
<TagsSelector selectedTagNames={previewFile['tags']} onAdd={localAddTag} onRemove={localRemoveTag}/>
|
||||
</TagsProvider>;
|
||||
const tagsDisplay = <TagsSelector selectedTagNames={previewFile['tags']} onAdd={localAddTag}
|
||||
onRemove={localRemoveTag}/>;
|
||||
let downloadButton;
|
||||
if (downloadURL) {
|
||||
downloadButton = <SButton color='yellow' as='a' href={downloadURL} floated='left'>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue