Skip to content

Commit f2e05d0

Browse files
authored
Merge pull request #296 from 1chooo/refactor/#203
Refactor/#203
2 parents 4c61ac2 + e379236 commit f2e05d0

24 files changed

+341
-852
lines changed

apps/web/src/app/page.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,21 @@ import AboutText from '@/components/about/about-text';
55
import GitHubStats from '@/components/about/github-stats';
66
import TechStack from '@/components/about/tech-stack';
77
import LifeStyles from '@/components/about/life-styles';
8-
import { abouts } from '@/config/about';
8+
import config from '@/config';
99
import PageContent from '@/components/page-content';
1010
import H4 from '@/components/markdown/h4';
1111

12-
const { subHeader, pronouns } = abouts;
12+
const { about } = config;
13+
const { subHeader, pronouns } = about;
14+
const { header } = about;
1315

1416
const About = () => {
1517
const pathname = usePathname();
1618

1719
return (
1820
<PageContent
1921
documentTitle=''
20-
title={abouts.header}
22+
title={header}
2123
page="about"
2224
pathName={pathname}
2325
>

apps/web/src/app/post/page.tsx

-30
This file was deleted.

apps/web/src/app/resume/page.tsx

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ import React from "react";
44
import { usePathname } from 'next/navigation';
55
import DownloadCV from '@/components/resume/download-cv';
66
import TimeLine from '@/components/resume/timeline';
7-
import {
8-
professionalExperiences, educations,
9-
awardLeaderships, teachingExperiences
10-
} from '@/config/resume';
117
import PageContent from '@/components/page-content';
128

9+
import config from "@/config";
10+
11+
const { resume } = config;
12+
const { professionalExperiences } = resume;
13+
const { educations } = resume;
14+
const { awardLeaderships } = resume;
15+
const { teachingExperiences } = resume;
16+
1317
const profExp = <TimeLine data={professionalExperiences} />;
1418
const education = <TimeLine data={educations} />;
1519
const awardLeadership = <TimeLine data={awardLeaderships} />;

apps/web/src/components/about/about-text.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react';
22
import MarkdownRenderer from '@/components/markdown/markdown-renderer';
33

4-
import { abouts } from '@/config/about';
4+
import config from '@/config';
55
import "@/styles/about/about-text.css"
66

7-
const { introductions } = abouts;
7+
const { introductions } = config.about;
88

99
const AboutText: React.FC = () => {
1010

apps/web/src/components/about/github-stats.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React, { useEffect, useState, FC } from 'react';
22
import GitHubCalendar from 'react-github-calendar';
33
import { ThemeInput } from 'react-activity-calendar';
44

5-
import H4 from '../markdown/h4';
5+
import H4 from '@/components/markdown/h4';
66

7-
import { abouts } from '@/config/about';
7+
import config from '@/config';
88

99
/*
1010
* goto https://grubersjoe.github.io/react-activity-calendar/
@@ -15,8 +15,11 @@ const yellowTheme: ThemeInput = {
1515
dark: ['hsl(0, 0%, 22%)', '#FFDA6B'],
1616
};
1717

18-
const { socialMedia: { githubUsername } } = abouts;
18+
const { socialMedia } = config;
19+
const { githubUsername } = socialMedia;
20+
1921
const subHeaderText = '$ ls -al GitHub Stats';
22+
2023
const MOBILE_CALENDAR_SIZE = 12;
2124
const LAPTOP_CALENDAR_SIZE = 12;
2225
const MOBILE_BREAKPOINT = 768;

apps/web/src/components/about/life-styles.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
import H4 from '../markdown/h4';
2-
import { abouts } from '@/config/about';
1+
import H4 from '@/components/markdown/h4';
32
import ServiceItem from './service-item';
43

4+
import config from '@/config';
5+
import type { LifeStyle } from '@/types/about';
6+
7+
const { about } = config;
8+
const { lifestyles } = about;
59
const subHeader = "$ ls -al Life Style";
610

711
const LifeStyles: React.FC = () => {
8-
const { lifestyle: lifestyles } = abouts;
9-
1012
return (
1113
<section className="service">
1214
<H4 text={subHeader} />
1315

1416
<ul className="service-list">
15-
{lifestyles.map((lifestyle) => (
17+
{lifestyles.map((lifestyle: LifeStyle) => (
1618
<ServiceItem lifestyle={lifestyle} key={lifestyle.title} />
1719
))}
1820
</ul>

apps/web/src/components/about/tech-stack.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import Image from 'next/image';
2-
import H4 from '../markdown/h4';
2+
import H4 from '@/components/markdown/h4';
33

4+
import config from '@/config';
45
import type { TechStack as TechStackType } from '@/types/about';
5-
import { abouts } from '@/config/about';
66

77
const subHeader = "$ ls -al Tech Stack";
8-
const { programmingLanguage, devOps } = abouts;
8+
const { about } = config;
9+
const { programmingLanguage, devOps } = about;
910

1011
const TechStack: React.FC = () => {
1112
const renderTechStackList = (techStack: TechStackType[]) => {

apps/web/src/components/blog/blog-post-list.tsx

-41
This file was deleted.

apps/web/src/components/blog/blog-post.tsx

-142
This file was deleted.

apps/web/src/components/blog/pagination.tsx

-39
This file was deleted.

apps/web/src/components/nav-bar/nav-bar.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import React from 'react';
44
import Link from 'next/link';
55
import { usePathname } from 'next/navigation';
6-
import { navItems } from '@/config/nav-bar';
6+
import config from '@/config';
77

88
import '@/styles/nav-bar.css'
99

10+
const navItems = config.navItems;
11+
1012
export const NavBar: React.FC = () => {
1113
const pathname = usePathname();
1214

0 commit comments

Comments
 (0)