Hi 👋🏾, I'm Andre Simamora
About Me
import { useEffect, useState } from 'react';
interface CurrentWorkplace {
company: string;
position: string;
}
interface AboutMeState {
currentWorkplace: CurrentWorkplace;
dailyKnowledge: string[];
fullName: string;
}
interface AboutMeHook {
aboutMe: AboutMeState;
}
export default function useAboutMe(): AboutMeHook {
const [aboutMe, setAboutMe] = useState<AboutMeState>({
currentWorkplace: {} as CurrentWorkplace,
dailyKnowledge: [],
fullName: ''
});
useEffect(() => {
setFullName();
setDailyKnowledge();
setCurrentWorkplace();
}, []);
function setFullName(): void {
setAboutMe({
...aboutMe,
fullName: 'Andriannus Parasian'
});
}
function setCurrentWorkplace(): void {
setAboutMe({
...aboutMe,
currentWorkplace: {
company: 'eFishery',
position: 'Frontend Engineer'
}
});
}
function setDailyKnowledge(): void {
setAboutMe({
...aboutMe,
dailyKnowledge: [
'JavaScript',
'TypeScript',
'React.js',
'Vue',
'Angular',
'AJAX',
'CSS Preprocessor',
'Unit Test',
'E2E Test',
'Git',
'JIRA/ClickUp'
]
});
}
return { aboutMe };
}