Skip to content

Commit

Permalink
feat: 임시 reverse 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Sep 3, 2023
1 parent 1232d05 commit ee00f1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/GridWrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Flex from "src/components/common/Flex";
import QfeedFrame from "src/pages-edit/home/components/QfeedFrame";
import { enterComponentVariants } from "src/constants/animation";
import { Questions } from "src/models/questions";
import { useEffect, useState } from "react";

const QuestionGrid = ({
questions,
Expand All @@ -14,7 +15,11 @@ const QuestionGrid = ({
questions: Questions;
detail?: boolean;
}) => {
const sortedData = questions.data.reverse();
const [sortedData, setSortedData] = useState(questions.data.reverse());
useEffect(() => {
setSortedData(questions.data.reverse());
}, [questions]);

return (
<GridWrapper
variants={enterComponentVariants}
Expand Down

0 comments on commit ee00f1b

Please sign in to comment.