feat: moved constants into a constants folder

This commit is contained in:
William Grant 2022-10-10 16:29:19 +11:00
parent 13efc85d5a
commit 2f0e993af3
11 changed files with 15 additions and 10 deletions

View file

@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { COLORS } from '../../../themes/colors';
import { COLORS } from '../../../themes/constants/colors';
import { getInitials } from '../../../util/getInitials';
type Props = {

View file

@ -6,7 +6,12 @@ import Picker from '@emoji-mart/react';
import { useSelector } from 'react-redux';
import { getTheme } from '../../state/selectors/theme';
import { FixedBaseEmoji, FixedPickerProps } from '../../types/Reaction';
import { COLORS, PrimaryColorStateType, THEMES, ThemeStateType } from '../../themes/colors.js';
import {
COLORS,
PrimaryColorStateType,
THEMES,
ThemeStateType,
} from '../../themes/constants/colors.js';
import { hexColorToRGB } from '../../util/hexColorToRGB';
import { getPrimaryColor } from '../../state/selectors/primaryColor';
import { i18nEmojiData } from '../../util/emoji';

View file

@ -50,7 +50,7 @@ import { UserUtils } from '../../session/utils';
import { getLatestReleaseFromFileServer } from '../../session/apis/file_server_api/FileServerApi';
import { switchThemeTo } from '../../session/utils/Theme';
import { ThemeStateType } from '../../themes/colors';
import { ThemeStateType } from '../../themes/constants/colors';
import { getTheme } from '../../state/selectors/theme';
import { switchPrimaryColor } from '../../themes/switchPrimaryColor';

View file

@ -6,7 +6,7 @@ import { getTheme } from '../../state/selectors/theme';
import { SessionRadio, SessionRadioPrimaryColors } from '../basic/SessionRadio';
import { SpacerLG, SpacerMD } from '../basic/Text';
import { StyledDescriptionSettingsItem, StyledTitleSettingsItem } from './SessionSettingListItem';
import { getPrimaryColors, THEMES, ThemeStateType } from '../../themes/colors';
import { getPrimaryColors, THEMES, ThemeStateType } from '../../themes/constants/colors';
import { switchPrimaryColor } from '../../themes/switchPrimaryColor';
import { getPrimaryColor } from '../../state/selectors/primaryColor';

View file

@ -1,6 +1,6 @@
import { Dispatch } from 'redux';
import { applyTheme } from '../../state/ducks/theme';
import { ThemeStateType } from '../../themes/colors';
import { ThemeStateType } from '../../themes/constants/colors';
import { switchHtmlToDarkTheme, switchHtmlToLightTheme } from '../../themes/SessionTheme';
import { switchTheme } from '../../themes/switchTheme';

View file

@ -1,4 +1,4 @@
import { PrimaryColorStateType } from '../../themes/colors';
import { PrimaryColorStateType } from '../../themes/constants/colors';
export const APPLY_PRIMARY_COLOR = 'APPLY_PRIMARY_COLOR';

View file

@ -1,4 +1,4 @@
import { ThemeStateType } from '../../themes/colors';
import { ThemeStateType } from '../../themes/constants/colors';
export const APPLY_THEME = 'APPLY_THEME';

View file

@ -17,7 +17,7 @@ import {
reducer as stagedAttachments,
StagedAttachmentsStateType,
} from './ducks/stagedAttachments';
import { PrimaryColorStateType, ThemeStateType } from '../themes/colors';
import { PrimaryColorStateType, ThemeStateType } from '../themes/constants/colors';
export type StateType = {
search: SearchStateType;

View file

@ -1,4 +1,4 @@
import { PrimaryColorStateType } from '../../themes/colors';
import { PrimaryColorStateType } from '../../themes/constants/colors';
import { StateType } from '../reducer';
export const getPrimaryColor = (state: StateType): PrimaryColorStateType => state.primaryColor;

View file

@ -1,4 +1,4 @@
import { ThemeStateType } from '../../themes/colors';
import { ThemeStateType } from '../../themes/constants/colors';
import { StateType } from '../reducer';
export const getTheme = (state: StateType): ThemeStateType => state.theme;