Skip to content

Commit

Permalink
Merge branch 'develop' into feature/#35
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Sep 3, 2023
2 parents a83ba62 + 72261e8 commit 40992b0
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/components/GridWrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const QuestionGrid = (data: Questions) => {
};

const GridWrapper = styled(motion.div)`
width: 100%;
display: flex;
gap: 12px;
align-items: start;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Title/BackTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const BackTitle = forwardRef(function Div(
</div>
)}
<Menu>
<Report type={props.reportType} />
{/* <Report type={props.reportType} /> */}
</Menu>
</>
) : null}
Expand Down
4 changes: 4 additions & 0 deletions src/constants/queryKeys/questionKeys.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Qtype } from "src/models/questions";

export const questionKeys = {
all: ["question"] as const,
qtype: (id: number, qtype: Qtype) =>
[...questionKeys.all, id, qtype] as const,
detail: (id: number) => [...questionKeys.all, id] as const
};

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/questions/useGetUserQQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const useGetUserQQuery = (id: number, qtype: Qtype) => {
isLoading,
refetch
} = useQuery<any>(
questionKeys.detail(id),
questionKeys.qtype(id, qtype),
() => getUserQuestions(id, qtype),
{
onError: (error: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages-edit/friend/Friend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { enterComponentVariants } from "src/constants/animation";

export default function Mypage() {
const router = useRouter();
const search = useInput();
const search = useInput("");
const searchResult = useUsersQuery(search.value);

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages-edit/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function Home() {
<MakeOfficial onClick={handleClickBasicQuestion} />
<Spacing size={20} />

<Filter isSort={isSort} setIsSort={setIsSort} />
{/* <Filter isSort={isSort} setIsSort={setIsSort} /> */}
<Spacing size={14} />
{isLoading ? <></> : data && <QuestionGrid {...data} />}
{isLoading ? (
Expand Down
7 changes: 4 additions & 3 deletions src/pages-edit/home/components/MakeOfficial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ const MakeOfficial = (props: QuestionProps) => {

const getTime = () => {
const date = new Date();
if (!isNaN(endTime) && +date > endTime + 24 * 60 * 60 * 1000) {
const times = new Date(endTime + 24 * 60 * 60 * 1000 - +date);

if (+times <= 0) {
newQSet.mutate();
}

const times = new Date(endTime + 24 * 60 * 60 * 1000 - +date);
const hours = String(times.getHours()).padStart(2, "0");
const minutes = String(times.getMinutes()).padStart(2, "0");
const seconds = String(times.getSeconds()).padStart(2, "0");
Expand Down Expand Up @@ -70,7 +71,7 @@ const MakeOfficial = (props: QuestionProps) => {
<Text typo="Headline2b" color="light_qblack">
{time
? `${time.hour}:${time.min}:${time.sec}`
: ""}
: "00:00:00"}
</Text>
{/* <BottomButton>
<Text
Expand Down
4 changes: 2 additions & 2 deletions src/pages-edit/mypage/Mypage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export default function Mypage() {
{isLoading ? (
<Loading />
) : (
<Flex direction="column" align="center" gap={40}>
<Flex direction="column" align="center" gap={8}>
<Flex direction="column" gap={40}>
<Flex direction="column" gap={8}>
<NavigationTop
title="마이페이지"
// rightIcon={
Expand Down

0 comments on commit 40992b0

Please sign in to comment.