mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-19 19:21:33 +10:00
attempt to fix locale issue
This commit is contained in:
@ -27,7 +27,7 @@ type Props = {
|
|||||||
|
|
||||||
export const getServerSideProps: GetServerSideProps<Props | Promise<Props>, QueryParams> = async ({
|
export const getServerSideProps: GetServerSideProps<Props | Promise<Props>, QueryParams> = async ({
|
||||||
query,
|
query,
|
||||||
locale,
|
locale = 'en',
|
||||||
}) => {
|
}) => {
|
||||||
const { username, slug, secretKey } = query as QueryParams;
|
const { username, slug, secretKey } = query as QueryParams;
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ export const getServerSideProps: GetServerSideProps<Props | Promise<Props>, Quer
|
|||||||
if (isEmpty(secretKey)) throw new Error('There is no secret key!');
|
if (isEmpty(secretKey)) throw new Error('There is no secret key!');
|
||||||
|
|
||||||
const resume = await fetchResumeByIdentifier({ username, slug, options: { secretKey } });
|
const resume = await fetchResumeByIdentifier({ username, slug, options: { secretKey } });
|
||||||
const displayLocale = get(resume, 'metadata.locale') ?? locale ?? 'en';
|
const displayLocale = get(resume, 'metadata.locale') ?? locale;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
Reference in New Issue
Block a user