feat: update app version to 3.6.2

This commit is contained in:
Amruth Pillai
2022-08-26 00:00:18 +02:00
parent 57dd110187
commit 7902f67f4f
90 changed files with 1747 additions and 2060 deletions

View File

@ -6,7 +6,7 @@ import { useMemo } from 'react';
import { useAppSelector } from '@/store/hooks';
const Heading: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => {
const theme: Theme = useAppSelector((state) => get(state.resume, 'metadata.theme', {}));
const theme: Theme = useAppSelector((state) => get(state.resume.present, 'metadata.theme', {}));
const darkerPrimary = useMemo(() => darken(theme.primary, 0.2), [theme.primary]);
return (

View File

@ -15,11 +15,11 @@ import { getContrastColor } from '@/utils/styles';
import { addHttp, formatLocation, getPhotoClassNames } from '@/utils/template';
export const MastheadSidebar: React.FC = () => {
const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
const dateFormat: string = useAppSelector((state) => get(state.resume.present, 'metadata.date.format'));
const { name, headline, photo, email, phone, birthdate, website, location, profiles } = useAppSelector(
(state) => state.resume.basics
(state) => state.resume.present.basics
);
const theme: Theme = useAppSelector((state) => get(state.resume, 'metadata.theme', {}));
const theme: Theme = useAppSelector((state) => get(state.resume.present, 'metadata.theme', {}));
const contrast = useMemo(() => getContrastColor(theme.primary), [theme.primary]);
const color = useMemo(() => (contrast === 'dark' ? theme.text : theme.background), [theme, contrast]);
@ -72,7 +72,7 @@ export const MastheadSidebar: React.FC = () => {
};
export const MastheadMain: React.FC = () => {
const { summary } = useAppSelector((state) => state.resume.basics);
const { summary } = useAppSelector((state) => state.resume.present.basics);
return (
<div className="px-4 pt-4">

View File

@ -3,6 +3,7 @@ import { ListItem, Section as SectionType } from '@reactive-resume/schema';
import get from 'lodash/get';
import isArray from 'lodash/isArray';
import isEmpty from 'lodash/isEmpty';
import { useMemo } from 'react';
import Markdown from '@/components/shared/Markdown';
import { useAppSelector } from '@/store/hooks';
@ -20,15 +21,17 @@ const Section: React.FC<SectionProps> = ({
headlinePath = 'headline',
keywordsPath = 'keywords',
}) => {
const section: SectionType = useAppSelector((state) => get(state.resume, path, {}));
const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format'));
const section: SectionType = useAppSelector((state) => get(state.resume.present, path, {}));
const dateFormat: string = useAppSelector((state) => get(state.resume.present, 'metadata.date.format'));
const sectionId = useMemo(() => section.id || path.replace('sections.', ''), [path, section]);
if (!section.visible) return null;
if (isArray(section.items) && isEmpty(section.items)) return null;
return (
<section>
<section id={`Castform_${sectionId}`}>
<Heading>{section.name}</Heading>
<div
@ -67,7 +70,7 @@ const Section: React.FC<SectionProps> = ({
<div className="grid gap-1">
{level && <span className="opacity-75">{level}</span>}
{levelNum > 0 && (
<div className="level flex">
<div className="flex">
{Array.from(Array(5).keys()).map((_, index) => (
<div
key={index}