Skip to content

Type 문서

jin-Pro edited this page Aug 13, 2022 · 2 revisions

Atom Data Type

  • button

    type ButtonType = {
      size?: string;
      color?: string;
    };
    
    Button.defaultProps = {
      size: "Small",
      color: "#ffcfcf",
    };
  • chat

    type ChatProps = { 
      from: string; 
      type: "Mine" | "Other"; 
      message: string; 
      src: string | null 
    };
  • menuType

    type menuType = {
      link?: string;
      name: string;
    };
  • imageDiv

  export type ImageDivType = {
    type: string;
    image: string;
  };
  • LocationDropDown

    type LocationDropDownProps = { 
      locSelected: string; 
      handleLocationSelected: (e: React.ChangeEvent<HTMLSelectElement>) => void; 
      id: string 
    };
  • profileImage

  type ProfileImageType = {
    image: string | ArrayBuffer | null;
    type: string;
    onClick?: React.MouseEventHandler;
    ref?: (el: any) => HTMLDivElement;
    children?: React.ReactNode;
  };
  • profileInfo
  type PersonInfoType = {
    [key: string]: string | number | undefined | null | PersonInfoType[];
    id: string;
    image: string | null;
    location: string;
    sex: string;
    age: number;
    info: string;
    gid?: number | null;
    idx?: number;
  };

  type ProfileType = PersonInfoType & {
    member?: PersonInfoType[];
  };
  • RequestButton
  type RequestType = {
    from: string;
    to: string;
    info: ProfileType;
    state: string;
  };

  type RequestButtonProps = { type: string; data: RequestType; isTeam: string };
  • SideBarDiv
  type SideBarDivProps = { menu: string; link: string };

API Data Type

  • cowDogState:ProfileType[]
  type PersonInfoType = {
    [key: string]: string | number | undefined | null | PersonInfoType[];
    id: string;
    image: string | null;
    location: string;
    sex: string;
    age: number;
    info: string;
    gid?: number | null;
    idx?: number;
  };

  type ProfileType = PersonInfoType & {
    member?: PersonInfoType[];
  };
  • chatTarget:ChatInfoType
  type PersonInfoType = {
    [key: string]: string | number | undefined | null | PersonInfoType[];
    id: string;
    image: string | null;
    location: string;
    sex: string;
    age: number;
    info: string;
    gid?: number | null;
    idx?: number;
  };

  type MessageType = {
    from: string;
    message: string;
    source: string;
  };

  type ChatInfoType = {
    chatRoomId: number;
    member: PersonInfoType[];
    chatMessage: MessageType[];
  }
  • joinChatRoomState:joinChatType
  type joinChatType = {
    chatRoomId: number;
    notReadNum: number;
  };
  • chatState:ChatInfoType
  type PersonInfoType = {
    [key: string]: string | number | undefined | null | PersonInfoType[];
    id: string;
    image: string | null;
    location: string;
    sex: string;
    age: number;
    info: string;
    gid?: number | null;
    idx?: number;
  };

  type MessageType = {
    from: string;
    message: string;
    source: string;
  };

  type ChatInfoType = {
    chatRoomId: number;
    member: PersonInfoType[];
    chatMessage: MessageType[];
  }
  • requestState : RequestType
  type RequestType = {
    from: string;
    to: string;
    info: ProfileType;
    state: string;
  };
  • teamState : TeamInfoType
  type TeamInfoType = {
    image: string | null;
    id: string;
    info: string;
    location: string;
    age: number;
    sex: string;
    leader: string;
    member?: PersonInfoType[] | null;
  };
  • userState: PersonInfoType
  type PersonInfoType = {
    [key: string]: string | number | undefined | null | PersonInfoType[];
    id: string;
    image: string | null;
    location: string;
    sex: string;
    age: number;
    info: string;
    gid?: number | null;
    idx?: number;
  };
Clone this wiki locally