fix(client): fix issues raised through lgtm alerts

This commit is contained in:
Amruth Pillai 2022-03-12 18:56:00 +01:00
parent ef06240935
commit dfccb3130f
No known key found for this signature in database
GPG Key ID: E3C57DF9B80855AD
9 changed files with 17 additions and 17 deletions

View File

@ -1,4 +1,4 @@
import { Theme } from '@reactive-resume/schema';
import { Theme as ThemeType } from '@reactive-resume/schema';
import get from 'lodash/get';
import { useTranslation } from 'next-i18next';
@ -16,7 +16,7 @@ const Theme = () => {
const dispatch = useAppDispatch();
const { background, text, primary } = useAppSelector<Theme>((state) => get(state.resume, 'metadata.theme'));
const { background, text, primary } = useAppSelector<ThemeType>((state) => get(state.resume, 'metadata.theme'));
const handleChange = (property: string, color: string) => {
dispatch(setResumeState({ path: `metadata.theme.${property}`, value: color }));

View File

@ -1,8 +1,8 @@
import { Testimony } from '@/data/testimonials';
import { Testimony as TestimonyType } from '@/data/testimonials';
import styles from './Testimony.module.scss';
type Props = Testimony;
type Props = TestimonyType;
const Testimony: React.FC<Props> = ({ name, message }) => {
return (

View File

@ -3,7 +3,7 @@ export const FONTS_QUERY = 'fonts';
export const RESUMES_QUERY = 'resumes';
// Regular Expressions
export const VALID_URL_REGEX = /[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
export const VALID_URL_REGEX = /[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/;
// Date Formats
export const FILENAME_TIMESTAMP = 'DDMMYYYYHHmmss';

View File

@ -1,5 +1,5 @@
import { Email, Link, Phone } from '@mui/icons-material';
import { ListItem, Section } from '@reactive-resume/schema';
import { ListItem, Section as SectionType } from '@reactive-resume/schema';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
import isEmpty from 'lodash/isEmpty';
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
headlinePath = 'headline',
keywordsPath = 'keywords',
}) => {
const section: Section = useAppSelector((state) => get(state.resume, path, {}));
const section: SectionType = useAppSelector((state) => get(state.resume, path, {}));
const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
if (!section.visible) return null;

View File

@ -1,5 +1,5 @@
import { Email, Link, Phone } from '@mui/icons-material';
import { ListItem, Section } from '@reactive-resume/schema';
import { ListItem, Section as SectionType } from '@reactive-resume/schema';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
import isEmpty from 'lodash/isEmpty';
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
headlinePath = 'headline',
keywordsPath = 'keywords',
}) => {
const section: Section = useAppSelector((state) => get(state.resume, path, {}));
const section: SectionType = useAppSelector((state) => get(state.resume, path, {}));
const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));

View File

@ -1,5 +1,5 @@
import { Email, Link, Phone } from '@mui/icons-material';
import { ListItem, Section } from '@reactive-resume/schema';
import { ListItem, Section as SectionType } from '@reactive-resume/schema';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
import isEmpty from 'lodash/isEmpty';
@ -21,7 +21,7 @@ const Section: React.FC<SectionProps> = ({
headlinePath = 'headline',
keywordsPath = 'keywords',
}) => {
const section: Section = useAppSelector((state) => get(state.resume, path, {}));
const section: SectionType = useAppSelector((state) => get(state.resume, path, {}));
const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));

View File

@ -1,5 +1,5 @@
import { Email, Phone } from '@mui/icons-material';
import { ListItem, Section } from '@reactive-resume/schema';
import { ListItem, Section as SectionType } from '@reactive-resume/schema';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
import isEmpty from 'lodash/isEmpty';
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
headlinePath = 'headline',
keywordsPath = 'keywords',
}) => {
const section: Section = useAppSelector((state) => get(state.resume, path, {}));
const section: SectionType = useAppSelector((state) => get(state.resume, path, {}));
const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));

View File

@ -1,5 +1,5 @@
import { Email, Link, Phone } from '@mui/icons-material';
import { ListItem, Section } from '@reactive-resume/schema';
import { ListItem, Section as SectionType } from '@reactive-resume/schema';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
import isEmpty from 'lodash/isEmpty';
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
headlinePath = 'headline',
keywordsPath = 'keywords',
}) => {
const section: Section = useAppSelector((state) => get(state.resume, path, {}));
const section: SectionType = useAppSelector((state) => get(state.resume, path, {}));
const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));

View File

@ -1,5 +1,5 @@
import { Email, Link, Phone } from '@mui/icons-material';
import { ListItem, Section } from '@reactive-resume/schema';
import { ListItem, Section as SectionType } from '@reactive-resume/schema';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
import isEmpty from 'lodash/isEmpty';
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
headlinePath = 'headline',
keywordsPath = 'keywords',
}) => {
const section: Section = useAppSelector((state) => get(state.resume, path, {}));
const section: SectionType = useAppSelector((state) => get(state.resume, path, {}));
const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));