Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL committed Sep 16, 2024
1 parent 0032228 commit 46de5b7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions constants/keys/queryKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ export const STORE_GIFT = "storeGift";
export const COLLECTION_ALPHABET = "collectionAlphabet";

export const ADMIN_STUDY_RECORD = "adminStudyRecord";
export const ADMIN_LOCATION_ACTIVE = "adminLocationActive";

export const STUDY_PREFERENCE_LOCAL = "studyPreferenceLocal4";
14 changes: 14 additions & 0 deletions hooks/admin/quries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,17 @@ export const usePushQuery = (uid: string, options?: QueryOptions<void>) =>
},
options,
);

export const useAdminLocationActiveQuery = (month: number, options?: QueryOptions<any>) =>
useQuery(
[ADMIN_STUDY_RECORD, month],
async () => {
const res = await axios.get<any>(`${SERVER_URI}/static/sameLoc`, {
params: {
date: "2024-09-01",
},
});
return res.data;
},
options,
);
3 changes: 2 additions & 1 deletion pages/admin/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";
import { useRouter } from "next/router";
import { useSession } from "next-auth/react";
import { useRouter } from "next/router";
import styled from "styled-components";

import Header from "../../components/layouts/Header";
Expand Down Expand Up @@ -46,6 +46,7 @@ function Admin() {
<BlockName>유저 응답</BlockName>
<NavBlock>
<button onClick={() => onClick(`register`)}>가입신청 확인</button>
<button onClick={() => onClick(`locationActive`)}>지역 활동 정보 확인</button>
<button onClick={() => onClick(`studyAddition`)}>
신규 스터디 장소 추가 요청
</button>
Expand Down
11 changes: 11 additions & 0 deletions pages/admin/response/locationActive.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { useAdminLocationActiveQuery } from "../../../hooks/admin/quries";

interface LocationActiveProps {}

function LocationActive({}: LocationActiveProps) {
const { data } = useAdminLocationActiveQuery(2);
console.log(data);
return <>2</>;
}

export default LocationActive;

0 comments on commit 46de5b7

Please sign in to comment.