mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
React code splitting (#2603)
* Code split using react lazy * Split locales * Move to lodash-es * Import individual icons
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import {
|
||||
faChevronDown,
|
||||
faChevronUp,
|
||||
faClock,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Button, ButtonGroup, InputGroup, Form } from "react-bootstrap";
|
||||
import { Icon } from "src/components/Shared";
|
||||
import Icon from "src/components/Shared/Icon";
|
||||
import { DurationUtils } from "src/utils";
|
||||
|
||||
interface IProps {
|
||||
@@ -61,7 +66,7 @@ export const DurationInput: React.FC<IProps> = (props: IProps) => {
|
||||
disabled={props.disabled}
|
||||
onClick={() => increment()}
|
||||
>
|
||||
<Icon icon="chevron-up" />
|
||||
<Icon icon={faChevronUp} />
|
||||
</Button>
|
||||
<Button
|
||||
variant="secondary"
|
||||
@@ -69,7 +74,7 @@ export const DurationInput: React.FC<IProps> = (props: IProps) => {
|
||||
disabled={props.disabled}
|
||||
onClick={() => decrement()}
|
||||
>
|
||||
<Icon icon="chevron-down" />
|
||||
<Icon icon={faChevronDown} />
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
);
|
||||
@@ -86,7 +91,7 @@ export const DurationInput: React.FC<IProps> = (props: IProps) => {
|
||||
if (props.onReset) {
|
||||
return (
|
||||
<Button variant="secondary" onClick={onReset}>
|
||||
<Icon icon="clock" />
|
||||
<Icon icon={faClock} />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user