mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-20 19:51:27 +10:00
Remove useTranslation hook from util functions
This commit is contained in:
@ -1,37 +1,41 @@
|
||||
import React, { memo, useContext } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import PageContext from '../../../contexts/PageContext';
|
||||
import { formatDateRange, safetyCheck } from '../../../utils';
|
||||
|
||||
const EducationItem = ({ item, language }) => (
|
||||
<div>
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex flex-col text-left mr-2">
|
||||
<h6 className="font-semibold">{item.institution}</h6>
|
||||
<span className="text-xs">
|
||||
<strong>{item.degree}</strong> {item.field}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex flex-col items-end text-right">
|
||||
{item.startDate && (
|
||||
<h6 className="text-xs font-medium mb-1">
|
||||
(
|
||||
{formatDateRange({
|
||||
startDate: item.startDate,
|
||||
endDate: item.endDate,
|
||||
language,
|
||||
})}
|
||||
)
|
||||
</h6>
|
||||
)}
|
||||
<span className="text-sm font-medium">{item.gpa}</span>
|
||||
const EducationItem = ({ item, language }) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex flex-col text-left mr-2">
|
||||
<h6 className="font-semibold">{item.institution}</h6>
|
||||
<span className="text-xs">
|
||||
<strong>{item.degree}</strong> {item.field}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex flex-col items-end text-right">
|
||||
{item.startDate && (
|
||||
<h6 className="text-xs font-medium mb-1">
|
||||
(
|
||||
{formatDateRange({
|
||||
startDate: item.startDate,
|
||||
endDate: item.endDate,
|
||||
language,
|
||||
}, t)}
|
||||
)
|
||||
</h6>
|
||||
)}
|
||||
<span className="text-sm font-medium">{item.gpa}</span>
|
||||
</div>
|
||||
</div>
|
||||
{item.summary && (
|
||||
<ReactMarkdown className="markdown mt-2 text-sm" source={item.summary} />
|
||||
)}
|
||||
</div>
|
||||
{item.summary && (
|
||||
<ReactMarkdown className="markdown mt-2 text-sm" source={item.summary} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
);
|
||||
};
|
||||
|
||||
const EducationA = () => {
|
||||
const { data, heading: Heading } = useContext(PageContext);
|
||||
|
||||
@ -1,32 +1,36 @@
|
||||
import React, { memo, useContext } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import PageContext from '../../../contexts/PageContext';
|
||||
import { formatDateRange, safetyCheck } from '../../../utils';
|
||||
|
||||
const WorkItem = ({ item, language }) => (
|
||||
<div>
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex flex-col text-left mr-2">
|
||||
<h6 className="font-semibold">{item.company}</h6>
|
||||
<span className="text-xs">{item.position}</span>
|
||||
const WorkItem = ({ item, language }) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex flex-col text-left mr-2">
|
||||
<h6 className="font-semibold">{item.company}</h6>
|
||||
<span className="text-xs">{item.position}</span>
|
||||
</div>
|
||||
{item.startDate && (
|
||||
<h6 className="text-xs font-medium text-right">
|
||||
(
|
||||
{formatDateRange({
|
||||
startDate: item.startDate,
|
||||
endDate: item.endDate,
|
||||
language,
|
||||
}, t)}
|
||||
)
|
||||
</h6>
|
||||
)}
|
||||
</div>
|
||||
{item.startDate && (
|
||||
<h6 className="text-xs font-medium text-right">
|
||||
(
|
||||
{formatDateRange({
|
||||
startDate: item.startDate,
|
||||
endDate: item.endDate,
|
||||
language,
|
||||
})}
|
||||
)
|
||||
</h6>
|
||||
{item.summary && (
|
||||
<ReactMarkdown className="markdown mt-2 text-sm" source={item.summary} />
|
||||
)}
|
||||
</div>
|
||||
{item.summary && (
|
||||
<ReactMarkdown className="markdown mt-2 text-sm" source={item.summary} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
);
|
||||
};
|
||||
|
||||
const WorkA = () => {
|
||||
const { data, heading: Heading } = useContext(PageContext);
|
||||
|
||||
Reference in New Issue
Block a user