fix(client): fix issues raised through lgtm alerts
This commit is contained in:
parent
ef06240935
commit
dfccb3130f
|
@ -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 }));
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
Loading…
Reference in New Issue