masters2023-3rd-project-bugbusters / issue-tracker-max

2023 마스터즈 맥스 프로젝트 이슈 트래커
http://3.36.120.124:5173/
0 stars 0 forks source link

[fe] 메인 페이지 설계 #21

Closed hjsong333 closed 10 months ago

hjsong333 commented 11 months ago

To Do

Considerations

hjsong333 commented 11 months ago
import { ThemeProvider } from "styled-components";
import { designSystem } from "./constants/designSystem";

export default function Main() {
  return (
    <ThemeProvider theme={designSystem}>
      <MainHeader />
      <MainBody />
    </ThemeProvider>
  );
}

function MainHeader() {
  return (
    <>
      <FilterBar />
      <TabButton />
      <Button />
    </>
  );
}

type MainBodyProps = {
  issues: Issue[]; // API 형태를 그대로 따른다
  openedIssueCount: number;
  closedIssueCount: number;
  multiFilters: Filters; // API 형태를 그대로 따른다
}

function MainBody(props: MainBodyProps) {
  return <div>
    <IssueTableHeader />
    <IssueTableList />
  </div>;
}

type IssueTableHeaderProps = {
  openedIssueCount: number;
  closedIssueCount: number;
  multiFilters: Filters;
  // 현재 선택된 이슈 상태는? opened or closed
};

function IssueTableHeader(props: IssueTableHeaderProps) {
  return <>
    <TabButton />
    <FilterList />
  </>;
}

type IssueTableListProps = {
  issues: Issue[];
};

function IssueTableList(props: IssueTableListProps) {
  return <></>;
}

type FilterBarProps = {
  name: string;
  options: {
    name: string;
    onClick: () => void;
  }[];
  currentFilter: string;
  onFilterChange: (filter: string) => void;
};

function FilterBar(props: FilterBarProps) {
  return <></>;
}

type TabButtonProps = {
  tabs: string[];
  onClick: (param: string) => void; // 같은 페이지로 이동
};

function TabButton(props: TabButtonProps) {
  return <></>;
}