Skip to content

Commit

Permalink
feat(about): Remove progress
Browse files Browse the repository at this point in the history
  • Loading branch information
1ilsang committed Mar 27, 2024
1 parent 7ce2603 commit f623579
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 50 deletions.
10 changes: 1 addition & 9 deletions src/features/about/work/card/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FunctionComponent, useEffect, useMemo, useState } from 'react';
import { FunctionComponent, useEffect, useState } from 'react';

import { Company } from '../models';

Expand All @@ -15,8 +15,6 @@ const WorkCardContainer: FunctionComponent<WorkCardContainerProps> = (
props,
) => {
const {
workStartDate,
workEndDate,
projectList,
toggleOpenAll,
companyHref,
Expand All @@ -29,11 +27,6 @@ const WorkCardContainer: FunctionComponent<WorkCardContainerProps> = (
const [open, setOpen] = useState(true);
const handleHeadlineClick = () => setOpen(!open);

const totalPeriod = useMemo(() => {
const end = workEndDate ?? Number(new Date());
return end - workStartDate;
}, [workStartDate, workEndDate]);

const [hydrated, setHydrated] = useState(false);

useEffect(() => {
Expand Down Expand Up @@ -66,7 +59,6 @@ const WorkCardContainer: FunctionComponent<WorkCardContainerProps> = (
key={project.name}
{...project}
format={format}
totalPeriod={totalPeriod}
/>
))}
</div>
Expand Down
9 changes: 0 additions & 9 deletions src/features/about/work/card/content/Project.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FunctionComponent, MouseEventHandler, useMemo, useState } from 'react';

import { Project, ProjectName } from '../../models';
import ProgressBar from '../../../../shared/components/ProgressBar';

import UVP from './description/UVP';
import OAL from './description/OAL';
Expand All @@ -18,7 +17,6 @@ import ProjectDate from './ProjectDate';
import ExternalLink from '~/shared/components/ExternalLink';

export type CompanyContentProjectProps = Project & {
totalPeriod: number;
format?: string;
};

Expand All @@ -28,16 +26,10 @@ const CompanyContentProject: FunctionComponent<CompanyContentProjectProps> = ({
tags,
startDate,
endDate,
totalPeriod,
format = 'yyyy.MM',
}) => {
const [open, setOpen] = useState(name === ProjectName.UVP);

const value = useMemo(
() => (endDate ?? Number(new Date())) - startDate,
[startDate, endDate],
);

const handleDetailClick: MouseEventHandler<HTMLDivElement> = () => {
setOpen(!open);
};
Expand Down Expand Up @@ -65,7 +57,6 @@ const CompanyContentProject: FunctionComponent<CompanyContentProjectProps> = ({
format={format}
/>
)}
<ProgressBar value={value} total={totalPeriod} />
</div>
<Tags tags={tags} />
</div>
Expand Down
32 changes: 0 additions & 32 deletions src/features/shared/components/ProgressBar.tsx

This file was deleted.

0 comments on commit f623579

Please sign in to comment.