Skip to content

Commit 02b4c52

Browse files
committed
Fixed types
1 parent 2b62a5a commit 02b4c52

4 files changed

Lines changed: 21 additions & 21 deletions

File tree

src/components/background/background.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ export default function Background() {
1414
</>
1515
);
1616
};
17-

src/components/icons/ControllerIcon.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,22 @@ interface ControllerIconProps {
5252
}
5353

5454
export default function ControllerIcon({
55-
style = "white",
56-
icon,
57-
className = "",
58-
width = 200,
59-
height = 200,
60-
styleProps = {},
55+
style = "white",
56+
icon,
57+
className = "",
58+
width = 200,
59+
height = 200,
60+
styleProps = {},
6161
}: ControllerIconProps) {
62-
return (
63-
<>
64-
<Image
65-
src={`/svg/xbox_${style}/${icon}.svg`}
66-
alt={`${style} ${icon}`}
67-
className={className}
68-
width={width}
69-
height={height}
70-
/>
71-
</>
72-
);
62+
return (
63+
<>
64+
<Image
65+
src={`/svg/xbox_${style}/${icon}.svg`}
66+
alt={`${style} ${icon}`}
67+
className={className}
68+
width={width}
69+
height={height}
70+
/>
71+
</>
72+
);
7373
}

src/components/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ export type SnackbarType = {
44
icon?: React.FunctionComponent<React.SVGProps<SVGElement>>;
55
}
66

7+
export type SnackbarVariant = 'success' | 'error' | 'secret' | 'info';
8+
79
export type TSnackbarProps = Omit<SnackbarType, 'key'> & {
810
handleClose: () => void;
911
open: boolean;
10-
variant: Variant;
12+
variant: SnackbarVariant;
1113
}
1214

1315
export type KeyPressAction = {

src/context/SnackbarContext.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import React, { createContext, useContext, useState, useEffect, useRef } from "r
44
import { faInfoCircle, faExclamationCircle, IconDefinition, faCheckCircle, faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
55
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
66
import { useAudio } from '@context/AudioContext';
7-
8-
type SnackbarVariant = "success" | "error" | "info" | "secret";
7+
import { SnackbarVariant } from '@components/types';
98

109
const SNACKBAR_AUDIO_SRC = '/audio/snd_system_ok.wav';
1110

0 commit comments

Comments
 (0)