Skip to content

Commit

Permalink
[#13] Add informationPage - useQuery 이용 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ppacman committed Jun 2, 2023
1 parent c4c7e74 commit e033890
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/components/infoPage/InformationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ import Scheduler from "./components/Scheduler";
import InfoCardWrapp from "./components/InfoCardWrapp";
import { Link } from "react-scroll";
import { BsChevronCompactDown } from "react-icons/bs";
import { useQueryGetSchedules } from "../../hooks/query/scheduler/useQueryGetSchedules";

const InformationPage = () => {
const { data, isLoading, error } = useQueryGetSchedules();




return (
<Wrapper>
<InfoHead>
Expand All @@ -31,6 +37,7 @@ const InformationPage = () => {
<ScheduleBox>
<Scheduler />
</ScheduleBox>

</Wrapper>
);
};
Expand Down
15 changes: 13 additions & 2 deletions src/components/infoPage/components/Scheduler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import character from "../../../../public/img/information/character.png";
import Image from "next/image";
import { useRecoilState } from "recoil";
import { personState, PersonState } from "../../../recoil/infoCard";
import { useQueryGetSchedules } from "../../../hooks/query/scheduler/useQueryGetSchedules";




setOptions({
locale: localeKo,
Expand All @@ -24,6 +28,11 @@ setOptions({
});

const Scheduler = () => {
const { isLoading,data,error } = useQueryGetSchedules();




const [state, setState] = useRecoilState<PersonState>(personState);

function toggleState(key: keyof PersonState) {
Expand Down Expand Up @@ -104,9 +113,9 @@ const Scheduler = () => {
<Eventcalendar
renderHeader={customWithNavButtons}
view={calView}
data={[
data={[
{
name: "hyoseong",
name: "hyoseong",
start: "2023-04-03T08:00",
end: "2023-04-03T17:00",
title: "이것저것 합니다..",
Expand Down Expand Up @@ -172,7 +181,9 @@ const Scheduler = () => {
]}
cssClass="md-custom-header-filtering"
/>

</Wrapper>

);
};

Expand Down

0 comments on commit e033890

Please sign in to comment.