style(changelog): add standard-version to automate releases and tags
This commit is contained in:
parent
0f1c3a8142
commit
4b7e43424c
|
@ -2,8 +2,7 @@
|
|||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [3.0.0](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.0.0-beta.4...v3.0.0) (2022-03-10)
|
||||
|
||||
## [3.0.0-beta.5](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2022-03-10)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import {
|
|||
import { DateConfig, Resume } from '@reactive-resume/schema';
|
||||
import dayjs from 'dayjs';
|
||||
import get from 'lodash/get';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useMemo } from 'react';
|
||||
import { useMutation } from 'react-query';
|
||||
|
@ -29,6 +30,8 @@ import { setResumeState } from '@/store/resume/resumeSlice';
|
|||
import { dateFormatOptions } from '@/utils/date';
|
||||
|
||||
const Settings = () => {
|
||||
const router = useRouter();
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
const dispatch = useAppDispatch();
|
||||
|
@ -59,7 +62,14 @@ const Settings = () => {
|
|||
dispatch(setResumeState({ path: 'metadata.date.format', value }));
|
||||
|
||||
const handleChangeLanguage = (value: Language | null) => {
|
||||
dispatch(setLanguage({ language: value?.code || 'en' }));
|
||||
const { pathname, asPath, query } = router;
|
||||
const locale = value?.code || 'en';
|
||||
|
||||
dayjs.locale(locale);
|
||||
dispatch(setLanguage({ language: locale || 'en' }));
|
||||
document.cookie = `NEXT_LOCALE=${locale}; path=/; expires=2147483647`;
|
||||
|
||||
router.push({ pathname, query }, asPath, { locale });
|
||||
};
|
||||
|
||||
const handleLoadSampleData = async () => {
|
||||
|
|
|
@ -9,6 +9,11 @@ export const languages: Language[] = [
|
|||
code: 'en',
|
||||
name: 'English',
|
||||
},
|
||||
{
|
||||
code: 'kn',
|
||||
name: 'Kannada',
|
||||
localName: 'ಕನ್ನಡ',
|
||||
},
|
||||
];
|
||||
|
||||
export const languageMap: Record<string, Language> = languages.reduce(
|
||||
|
|
|
@ -3,7 +3,7 @@ const path = require('path');
|
|||
const i18nConfig = {
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'ta'],
|
||||
locales: ['en', 'kn'],
|
||||
},
|
||||
nsSeparator: '.',
|
||||
localePath: path.resolve('./public/locales'),
|
||||
|
|
|
@ -5,6 +5,9 @@ import { useEffect } from 'react';
|
|||
const DateWrapper: React.FC = ({ children }) => {
|
||||
useEffect(() => {
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
// Locales
|
||||
require('dayjs/locale/kn');
|
||||
}, []);
|
||||
|
||||
return <>{children}</>;
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { useAppSelector } from '@/store/hooks';
|
||||
|
||||
const LocaleWrapper: React.FC = ({ children }) => {
|
||||
const router = useRouter();
|
||||
|
||||
const language = useAppSelector((state) => state.build.language);
|
||||
|
||||
useEffect(() => {
|
||||
if (!language) return;
|
||||
|
||||
const { code } = language;
|
||||
const { pathname, asPath, query, locale } = router;
|
||||
|
||||
document.cookie = `NEXT_LOCALE=${code}; path=/; expires=2147483647`;
|
||||
|
||||
if (locale !== code) {
|
||||
router.push({ pathname, query }, asPath, { locale: code });
|
||||
}
|
||||
}, [router, language]);
|
||||
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
export default LocaleWrapper;
|
|
@ -1,7 +1,6 @@
|
|||
import DateWrapper from './DateWrapper';
|
||||
import FontWrapper from './FontWrapper';
|
||||
import HotkeysWrapper from './HotkeysWrapper';
|
||||
import LocaleWrapper from './LocaleWrapper';
|
||||
import ThemeWrapper from './ThemeWrapper';
|
||||
|
||||
const WrapperRegistry: React.FC = ({ children }) => {
|
||||
|
@ -10,9 +9,7 @@ const WrapperRegistry: React.FC = ({ children }) => {
|
|||
<FontWrapper>
|
||||
<HotkeysWrapper>
|
||||
<DateWrapper>
|
||||
<LocaleWrapper>
|
||||
<>{children}</>
|
||||
</LocaleWrapper>
|
||||
<>{children}</>
|
||||
</DateWrapper>
|
||||
</HotkeysWrapper>
|
||||
</FontWrapper>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "reactive-resume",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.0-beta.5",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"schema",
|
||||
|
|
788
pnpm-lock.yaml
788
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue