Skip to content

Commit

Permalink
ci: prettier compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
Grafikart committed Feb 2, 2024
1 parent 21bc0cc commit 008cdca
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useAsyncEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect } from "react";

export function useAsyncEffect(callback: () => Promise<unknown>, deps: unknown[]) {
return useEffect(() => {
(function() {
(function () {
callback();
})();
//eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down
2 changes: 0 additions & 2 deletions src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { createTheme, CssBaseline } from "@mui/material";
import { type CSSProperties, type PropsWithChildren } from "react";
import { ThemeProvider } from "@emotion/react";



declare module "@mui/material/styles" {
interface Palette {
red: string;
Expand Down
1 change: 0 additions & 1 deletion src/ui/ContactSinglePage/HistoryActionsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import HistoryIcon from "@mui/icons-material/History";
import { CardInner } from "./CardInner";
import { GeneralCardContent } from "./GeneralCardContent";


export const HistoryActionsCard = () => {
return (
<GeneralCardContent
Expand Down
1 change: 0 additions & 1 deletion src/ui/ContactSinglePage/PasswordCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { CardInner } from "./CardInner";
import { GeneralCardContent } from "./GeneralCardContent";
import { FormDialog } from "./FormDialog";


export const PasswordCard = () => {
const [open, setOpen] = useState(false);

Expand Down
13 changes: 7 additions & 6 deletions src/ui/Icon/Binocular.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { theme } from "../../theme.tsx";
import { SvgIcon, type SvgIconProps } from "@mui/material";

export function Binocular (props: SvgIconProps) {
console.log(theme)
return <SvgIcon viewBox="0 0 22 22" {...props}>
<path
d="M22.158 12.7v-.047a4.847 4.847 0 0 0-.325-.764l-3.15-7.436a3.128 3.128 0 0 0-6.138.162H10.32a3.128 3.128 0 0 0-6.139-.162l-3.126 7.39c-.13.244-.238.5-.324.764v.046a4.84 4.84 0 0 0 3.822 6.254 4.886 4.886 0 0 0 5.629-3.938c.077-.443.093-.895.046-1.343v-.487h2.41v.487a4.865 4.865 0 0 0 2.061 4.494c.82.576 1.8.884 2.803.88.287.002.574-.022.857-.07a4.841 4.841 0 0 0 3.822-6.254l-.023.024Zm-7.575-8.27a1.297 1.297 0 0 1 2.317.51.932.932 0 0 0 .092.254l1.784 4.216a4.84 4.84 0 0 0-4.332.903l-.07-4.771v-.14c-.065-.339.009-.69.209-.972Zm-4.262 2.038h2.224v2.41h-2.247l.023-2.41ZM7.449 3.897A1.298 1.298 0 0 1 8.49 5.38v.139l-.07 4.794a4.84 4.84 0 0 0-4.331-.88l1.783-4.216a.93.93 0 0 0 .093-.255 1.297 1.297 0 0 1 1.484-1.065ZM7.1 16.614a3.011 3.011 0 0 1-4.633-3.336l.278-.625a3.034 3.034 0 0 1 2.641-1.552l.533.046a3.034 3.034 0 0 1 2.455 2.572v.903A3.012 3.012 0 0 1 7.1 16.614Zm3.15-5.328v-.556h2.34v.58l-2.34-.024Zm9.73 4.587a3.034 3.034 0 0 1-5.467-1.205v-.95a3.034 3.034 0 0 1 2.455-2.57l.533-.047a3.035 3.035 0 0 1 2.64 1.552l.278.625c.27.883.116 1.84-.417 2.595h-.022Z" />
</SvgIcon>
export function Binocular(props: SvgIconProps) {
console.log(theme);
return (
<SvgIcon viewBox="0 0 22 22" {...props}>
<path d="M22.158 12.7v-.047a4.847 4.847 0 0 0-.325-.764l-3.15-7.436a3.128 3.128 0 0 0-6.138.162H10.32a3.128 3.128 0 0 0-6.139-.162l-3.126 7.39c-.13.244-.238.5-.324.764v.046a4.84 4.84 0 0 0 3.822 6.254 4.886 4.886 0 0 0 5.629-3.938c.077-.443.093-.895.046-1.343v-.487h2.41v.487a4.865 4.865 0 0 0 2.061 4.494c.82.576 1.8.884 2.803.88.287.002.574-.022.857-.07a4.841 4.841 0 0 0 3.822-6.254l-.023.024Zm-7.575-8.27a1.297 1.297 0 0 1 2.317.51.932.932 0 0 0 .092.254l1.784 4.216a4.84 4.84 0 0 0-4.332.903l-.07-4.771v-.14c-.065-.339.009-.69.209-.972Zm-4.262 2.038h2.224v2.41h-2.247l.023-2.41ZM7.449 3.897A1.298 1.298 0 0 1 8.49 5.38v.139l-.07 4.794a4.84 4.84 0 0 0-4.331-.88l1.783-4.216a.93.93 0 0 0 .093-.255 1.297 1.297 0 0 1 1.484-1.065ZM7.1 16.614a3.011 3.011 0 0 1-4.633-3.336l.278-.625a3.034 3.034 0 0 1 2.641-1.552l.533.046a3.034 3.034 0 0 1 2.455 2.572v.903A3.012 3.012 0 0 1 7.1 16.614Zm3.15-5.328v-.556h2.34v.58l-2.34-.024Zm9.73 4.587a3.034 3.034 0 0 1-5.467-1.205v-.95a3.034 3.034 0 0 1 2.455-2.57l.533-.047a3.035 3.035 0 0 1 2.64 1.552l.278.625c.27.883.116 1.84-.417 2.595h-.022Z" />
</SvgIcon>
);
}
12 changes: 6 additions & 6 deletions src/ui/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {Link as MuiLink, type LinkProps} from '@mui/material'
import {Link as RouterLink} from 'react-router-dom'
import { Link as MuiLink, type LinkProps } from "@mui/material";
import { Link as RouterLink } from "react-router-dom";

type Props = LinkProps & {
to: string
}
to: string;
};

export const Link = (props: Props) => {
return <MuiLink component={RouterLink} {...props}/>
}
return <MuiLink component={RouterLink} {...props} />;
};
4 changes: 2 additions & 2 deletions src/ui/Search/SearchSurveySelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import MenuItem from "@mui/material/MenuItem";
import Select, { SelectProps } from "@mui/material/Select";
import { useId } from "react";

type Props = { options: string[]; } & SelectProps;
type Props = { options: string[] } & SelectProps;

export const SearchSurveySelect = ({ options, ...props }: Props) => {
const id = useId();
const labelId = `${id}-label`
const labelId = `${id}-label`;
return (
<FormControl fullWidth>
<InputLabel size="small" id={labelId}>
Expand Down
4 changes: 2 additions & 2 deletions src/ui/VisibilitySpy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export function VisibilitySpy({ onVisible }: Props) {
const ref = useRef(null);
const intersection = useIntersection(ref, {});
const isIntersecting = intersection?.isIntersecting;
const onVisibleRef = useRef(onVisible)
onVisibleRef.current = onVisible
const onVisibleRef = useRef(onVisible);
onVisibleRef.current = onVisible;
useEffect(() => {
if (isIntersecting) {
onVisibleRef.current();
Expand Down

0 comments on commit 008cdca

Please sign in to comment.