mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 16:22:59 +10:00
fix(client): fix issues raised through lgtm alerts
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
import { Theme } from '@reactive-resume/schema';
|
import { Theme as ThemeType } from '@reactive-resume/schema';
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ const Theme = () => {
|
|||||||
|
|
||||||
const dispatch = useAppDispatch();
|
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) => {
|
const handleChange = (property: string, color: string) => {
|
||||||
dispatch(setResumeState({ path: `metadata.theme.${property}`, value: color }));
|
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';
|
import styles from './Testimony.module.scss';
|
||||||
|
|
||||||
type Props = Testimony;
|
type Props = TestimonyType;
|
||||||
|
|
||||||
const Testimony: React.FC<Props> = ({ name, message }) => {
|
const Testimony: React.FC<Props> = ({ name, message }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -3,7 +3,7 @@ export const FONTS_QUERY = 'fonts';
|
|||||||
export const RESUMES_QUERY = 'resumes';
|
export const RESUMES_QUERY = 'resumes';
|
||||||
|
|
||||||
// Regular Expressions
|
// 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
|
// Date Formats
|
||||||
export const FILENAME_TIMESTAMP = 'DDMMYYYYHHmmss';
|
export const FILENAME_TIMESTAMP = 'DDMMYYYYHHmmss';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Email, Link, Phone } from '@mui/icons-material';
|
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 get from 'lodash/get';
|
||||||
import isArray from 'lodash/isArray';
|
import isArray from 'lodash/isArray';
|
||||||
import isEmpty from 'lodash/isEmpty';
|
import isEmpty from 'lodash/isEmpty';
|
||||||
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
|
|||||||
headlinePath = 'headline',
|
headlinePath = 'headline',
|
||||||
keywordsPath = 'keywords',
|
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 dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
|
||||||
|
|
||||||
if (!section.visible) return null;
|
if (!section.visible) return null;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Email, Link, Phone } from '@mui/icons-material';
|
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 get from 'lodash/get';
|
||||||
import isArray from 'lodash/isArray';
|
import isArray from 'lodash/isArray';
|
||||||
import isEmpty from 'lodash/isEmpty';
|
import isEmpty from 'lodash/isEmpty';
|
||||||
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
|
|||||||
headlinePath = 'headline',
|
headlinePath = 'headline',
|
||||||
keywordsPath = 'keywords',
|
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 dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
|
||||||
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Email, Link, Phone } from '@mui/icons-material';
|
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 get from 'lodash/get';
|
||||||
import isArray from 'lodash/isArray';
|
import isArray from 'lodash/isArray';
|
||||||
import isEmpty from 'lodash/isEmpty';
|
import isEmpty from 'lodash/isEmpty';
|
||||||
@ -21,7 +21,7 @@ const Section: React.FC<SectionProps> = ({
|
|||||||
headlinePath = 'headline',
|
headlinePath = 'headline',
|
||||||
keywordsPath = 'keywords',
|
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 dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
|
||||||
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Email, Phone } from '@mui/icons-material';
|
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 get from 'lodash/get';
|
||||||
import isArray from 'lodash/isArray';
|
import isArray from 'lodash/isArray';
|
||||||
import isEmpty from 'lodash/isEmpty';
|
import isEmpty from 'lodash/isEmpty';
|
||||||
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
|
|||||||
headlinePath = 'headline',
|
headlinePath = 'headline',
|
||||||
keywordsPath = 'keywords',
|
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 dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
|
||||||
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Email, Link, Phone } from '@mui/icons-material';
|
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 get from 'lodash/get';
|
||||||
import isArray from 'lodash/isArray';
|
import isArray from 'lodash/isArray';
|
||||||
import isEmpty from 'lodash/isEmpty';
|
import isEmpty from 'lodash/isEmpty';
|
||||||
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
|
|||||||
headlinePath = 'headline',
|
headlinePath = 'headline',
|
||||||
keywordsPath = 'keywords',
|
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 dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
|
||||||
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Email, Link, Phone } from '@mui/icons-material';
|
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 get from 'lodash/get';
|
||||||
import isArray from 'lodash/isArray';
|
import isArray from 'lodash/isArray';
|
||||||
import isEmpty from 'lodash/isEmpty';
|
import isEmpty from 'lodash/isEmpty';
|
||||||
@ -20,7 +20,7 @@ const Section: React.FC<SectionProps> = ({
|
|||||||
headlinePath = 'headline',
|
headlinePath = 'headline',
|
||||||
keywordsPath = 'keywords',
|
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 dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
|
||||||
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary'));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user