mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 00:32:35 +10:00
release: v3.6.9
This commit is contained in:
@ -9,9 +9,9 @@ const FontWrapper: React.FC<React.PropsWithChildren<unknown>> = ({ children }) =
|
||||
|
||||
const loadFonts = useCallback(async () => {
|
||||
const WebFont = (await import('webfontloader')).default;
|
||||
const families = Object.values<string[]>(typography.family).reduce(
|
||||
const families = Object.values(typography.family).reduce(
|
||||
(acc, family) => [...acc, `${family}:400,600,700`],
|
||||
[]
|
||||
[] as string[]
|
||||
);
|
||||
|
||||
WebFont.load({ google: { families } });
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
import { useHotkeys } from 'react-hotkeys-hook';
|
||||
|
||||
import { toggleSidebar } from '@/store/build/buildSlice';
|
||||
import { useAppDispatch } from '@/store/hooks';
|
||||
|
||||
const HotkeysWrapper: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
useHotkeys('ctrl+/, cmd+/', () => {
|
||||
dispatch(toggleSidebar({ sidebar: 'left' }));
|
||||
dispatch(toggleSidebar({ sidebar: 'right' }));
|
||||
});
|
||||
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
export default HotkeysWrapper;
|
||||
@ -1,17 +1,14 @@
|
||||
import DateWrapper from './DateWrapper';
|
||||
import FontWrapper from './FontWrapper';
|
||||
import HotkeysWrapper from './HotkeysWrapper';
|
||||
import ThemeWrapper from './ThemeWrapper';
|
||||
|
||||
const WrapperRegistry: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => {
|
||||
return (
|
||||
<ThemeWrapper>
|
||||
<FontWrapper>
|
||||
<HotkeysWrapper>
|
||||
<DateWrapper>
|
||||
<>{children}</>
|
||||
</DateWrapper>
|
||||
</HotkeysWrapper>
|
||||
<DateWrapper>
|
||||
<>{children}</>
|
||||
</DateWrapper>
|
||||
</FontWrapper>
|
||||
</ThemeWrapper>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user