Moving theme constants into Theme.js.

This commit is contained in:
Roland 2022-10-25 15:25:44 -06:00
parent 7fa89dca58
commit 1033b0c38f
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
4 changed files with 9 additions and 15 deletions

View file

@ -3,8 +3,8 @@ import {Card, Container, IconGroup, Image, Input, Modal, Pagination, Responsive,
import {Link, NavLink} from "react-router-dom";
import Message from "semantic-ui-react/dist/commonjs/collections/Message";
import {useDownloaders, useHotspot, useThrottle} from "../hooks/customHooks";
import {darkTheme, StatusContext, ThemeContext} from "../contexts/contexts";
import {Button, CardIcon, Form, Header, Icon, Menu, Popup, Statistic} from "./Theme";
import {StatusContext, ThemeContext} from "../contexts/contexts";
import {Button, CardIcon, darkTheme, Form, Header, Icon, Menu, Popup, Statistic} from "./Theme";
export const API_URI = `http://${window.location.host}/api`;
export const VIDEOS_API = `${API_URI}/videos`;

View file

@ -1,5 +1,5 @@
import React, {useContext, useEffect, useState} from 'react';
import {darkTheme, lightTheme, ThemeContext} from "../contexts/contexts";
import {ThemeContext} from "../contexts/contexts";
import {
Accordion as ACCORDION,
Button as BUTTON,
@ -23,6 +23,9 @@ import {
TextArea as TEXTAREA
} from "semantic-ui-react";
export const darkTheme = 'dark';
export const lightTheme = 'light';
export function ThemeWrapper({children, ...props}) {
if (Object.keys(props).length > 0) {
console.log(props);

View file

@ -7,8 +7,8 @@ import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
import Container from "semantic-ui-react/dist/commonjs/elements/Container";
import {VideoPlaceholder} from "./Placeholder";
import {useChannel} from "../hooks/customHooks";
import {darkTheme, ThemeContext} from "../contexts/contexts";
import {Button, Header, Icon, Segment, Tab, TabPane} from "./Theme";
import {ThemeContext} from "../contexts/contexts";
import {Button, darkTheme, Header, Icon, Segment, Tab, TabPane} from "./Theme";
const MEDIA_PATH = '/media';

View file

@ -1,14 +1,5 @@
import React from "react";
export const darkTheme = 'dark';
export const lightTheme = 'light';
export const SettingsContext = React.createContext({});
export const ThemeContext = React.createContext({
theme: null,
i: {},
setTheme: () => {
},
});
export const ThemeContext = React.createContext({theme: null, i: {}});
export const StatusContext = React.createContext({});