mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 09:59:10 +00:00
chore: move src/common/utils to @roleypoly/misc-utils
This commit is contained in:
parent
a374030438
commit
65a8760e86
36 changed files with 38 additions and 465 deletions
|
@ -1,5 +1,5 @@
|
|||
import { withContext } from '@roleypoly/misc-utils/withContext';
|
||||
import * as React from 'react';
|
||||
import { withContext } from '../../../../src/common/utils/withContext';
|
||||
|
||||
export type ScreenSize = {
|
||||
onSmallScreen: boolean;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { FeatureFlagDecorator } from '@roleypoly/misc-utils/featureFlags/react/storyDecorator';
|
||||
import * as React from 'react';
|
||||
import { FeatureFlagDecorator } from '../../../../src/common/utils/featureFlags/react/storyDecorator';
|
||||
import { FeatureGate } from './FeatureGate';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as React from 'react';
|
||||
import {
|
||||
FeatureFlag,
|
||||
FeatureFlagsContext,
|
||||
} from '../../../../src/common/utils/featureFlags/react';
|
||||
} from '@roleypoly/misc-utils/featureFlags/react';
|
||||
import * as React from 'react';
|
||||
|
||||
export type FeatureGateProps = {
|
||||
featureFlag: FeatureFlag;
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
import { numberToChroma } from '@roleypoly/design-system/atoms/colors';
|
||||
import { evaluatePermission, permissions } from '@roleypoly/misc-utils/hasPermission';
|
||||
import { Role as RPCRole, RoleSafety } from '@roleypoly/types';
|
||||
import chroma from 'chroma-js';
|
||||
import * as React from 'react';
|
||||
import { FaCheck, FaTimes } from 'react-icons/fa';
|
||||
import {
|
||||
evaluatePermission,
|
||||
permissions,
|
||||
} from '../../../../src/common/utils/hasPermission';
|
||||
import * as styled from './Role.styled';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { NavSlug } from '@roleypoly/design-system/molecules/nav-slug';
|
||||
import { sortBy } from '@roleypoly/misc-utils/sortBy';
|
||||
import { GuildSlug, UserGuildPermissions } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import Scrollbars from 'react-custom-scrollbars';
|
||||
import { GoStar, GoZap } from 'react-icons/go';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { sortBy } from '../../../../src/common/utils/sortBy';
|
||||
import { GuildNavItem } from './GuildNav.styled';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Role } from '@roleypoly/design-system/atoms/role';
|
||||
import { AmbientLarge, LargeText } from '@roleypoly/design-system/atoms/typography';
|
||||
import { sortBy } from '@roleypoly/misc-utils/sortBy';
|
||||
import { Category as RPCCategory, Role as RPCRole, RoleSafety } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import styled from 'styled-components';
|
||||
import { sortBy } from '../../../../src/common/utils/sortBy';
|
||||
import { Head, HeadSub, HeadTitle } from './PickerCategory.styled';
|
||||
|
||||
export type CategoryProps = {
|
||||
|
|
|
@ -4,6 +4,8 @@ import { Link } from '@roleypoly/design-system/atoms/typography';
|
|||
import { PickerCategory } from '@roleypoly/design-system/molecules/picker-category';
|
||||
import { ResetSubmit } from '@roleypoly/design-system/molecules/reset-submit';
|
||||
import { ServerMasthead } from '@roleypoly/design-system/molecules/server-masthead';
|
||||
import { ReactifyNewlines } from '@roleypoly/misc-utils/ReactifyNewlines';
|
||||
import { sortBy } from '@roleypoly/misc-utils/sortBy';
|
||||
import {
|
||||
Category,
|
||||
CategoryType,
|
||||
|
@ -15,8 +17,6 @@ import {
|
|||
import { isEqual, xor } from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { GoInfo } from 'react-icons/go';
|
||||
import { ReactifyNewlines } from '../../../../src/common/utils/ReactifyNewlines';
|
||||
import { sortBy } from '../../../../src/common/utils/sortBy';
|
||||
import {
|
||||
CategoryContainer,
|
||||
Container,
|
||||
|
|
|
@ -3,11 +3,11 @@ import { Button } from '@roleypoly/design-system/atoms/button';
|
|||
import { DotOverlay } from '@roleypoly/design-system/atoms/dot-overlay';
|
||||
import { Hero } from '@roleypoly/design-system/atoms/hero';
|
||||
import { AccentTitle, SmallTitle } from '@roleypoly/design-system/atoms/typography';
|
||||
import { evaluatePermission } from '@roleypoly/misc-utils/hasPermission';
|
||||
import { GuildSlug, UserGuildPermissions } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { FaDiscord } from 'react-icons/fa';
|
||||
import { GoArrowLeft } from 'react-icons/go';
|
||||
import { evaluatePermission } from '../../../../src/common/utils/hasPermission';
|
||||
import { FlexLine, FlexWrap } from './ServerSetup.styled';
|
||||
|
||||
export type ServerSetupProps = {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { CompletelyStylelessLink } from '@roleypoly/design-system/atoms/typography';
|
||||
import { ServerListingCard } from '@roleypoly/design-system/molecules/server-listing-card';
|
||||
import { sortBy } from '@roleypoly/misc-utils/sortBy';
|
||||
import { GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { sortBy } from '../../../../src/common/utils/sortBy';
|
||||
import { CardContainer, ContentContainer } from './ServersListing.styled';
|
||||
|
||||
type ServersListingProps = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue