Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"source.fixAll.prettier": "explicit"
},
"eslint.nodePath": ".yarn/sdks",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"js/ts.tsdk.path": ".yarn/sdks/typescript/lib",
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
Comment on lines +11 to +12

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

VS Code 공식 설정에서 TypeScript SDK 경로/워크스페이스 버전 프롬프트에 해당하는 정확한 setting key가 무엇인지 확인해줘. (typescript.tsdk, typescript.enablePromptUseWorkspaceTsdk, js/ts.tsdk.path, js/ts.tsdk.promptToUseWorkspaceVersion 비교)

💡 Result:

정확한 setting key는 다음과 같습니다. 1) VS Code 공식 설정에서 “워크스페이스 tsdk 버전 사용을 위한 프롬프트”를 제어하는 key - typescript.enablePromptUseWorkspaceTsdk [1][2] 2) VS Code 공식 설정에서 “워크스페이스 tsdk 경로(= tsserver.js가 있는 디렉터리)”를 지정하는 key - js/ts.tsdk.path [3][4] - (참고) 질문에 적어주신 typescript.tsdk도 관련 설정이지만, 문서상 경로 지정은 js/ts.tsdk.path로 설명됩니다. 또한 docs에서도 “tsdk 경로만으로는 IntelliSense에 실제 적용이 바로 되지 않고 TypeScript: Select TypeScript Version 명령으로 실제 사용을 시작해야” 한다고 명시합니다. [3][4] 3) 질문에 적어주신 js/ts.tsdk.promptToUseWorkspaceVersion - 해당 key는 VS Code 공식 문서/근거 자료에서 확인되지 않았습니다. (반대로, 대신 typescript.enablePromptUseWorkspaceTsdk가 프롬프트 관련 설정으로 명시됩니다.) [1][2] 요약(비교) - typescript.tsdk: “workspace에 존재하는 TypeScript SDK를 사용하기 위한 설정”으로 언급되지만, 프롬프트 제어 key는 enablePromptUseWorkspaceTsdk입니다. [1][2] - typescript.enablePromptUseWorkspaceTsdk: “워크스페이스 tsdk 버전 사용을 위한 프롬프트”의 정확한 setting key입니다. [1][2] - js/ts.tsdk.path: workspace의 tsserver.js/lib 위치(= tsdk 경로)를 지정하는 key입니다. [3][4] - js/ts.tsdk.promptToUseWorkspaceVersion: 공식 문서상 근거로 확인되지 않았습니다. (프롬프트는 enablePromptUseWorkspaceTsdk로 제어됩니다.) [1][2]

Citations:


VS Code TypeScript SDK 설정 키 불일치 수정 필요

  • .vscode/settings.json 11-12의 js/ts.tsdk.path는 문서에 맞는 TypeScript SDK 경로 지정 키입니다.
  • 그러나 js/ts.tsdk.promptToUseWorkspaceVersion는 VS Code 공식 설정 키로 확인되지 않아 워크스페이스 tsdk “프롬프트/사용” 관련 동작이 누락될 수 있습니다. typescript.enablePromptUseWorkspaceTsdk로 교체하세요.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.vscode/settings.json around lines 11 - 12, Replace the incorrect VS Code
setting key "js/ts.tsdk.promptToUseWorkspaceVersion" with the correct official
key "typescript.enablePromptUseWorkspaceTsdk" so the workspace TypeScript SDK
prompt behavior works; leave "js/ts.tsdk.path" as-is and update the JSON entry
name accordingly.


"editor.formatOnSave": true,
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/api/dinings/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type OriginalDining = {
place: DiningPlace;
price_card: number | null;
price_cash: number | null;
kcal: number | null;
kcal: number;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

kcal nullable 제거는 API 계약 불일치 위험이 있습니다.

기존 nullable을 non-null로 바꾸면, 서버가 null을 반환하는 순간 클라이언트 타입 안정성이 깨집니다. 백엔드 계약이 확정되지 않았다면 number | null을 유지하거나, 파싱 레이어에서 null을 명시적으로 정규화해 주세요.

As per coding guidelines "src/api/**: 2. 요청/응답 타입이 명확하게 정의되어 있는지 확인해주세요."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/api/dinings/entity.ts` at line 16, The kcal field was changed to
non-nullable which can break client type-safety if backend may return null;
restore the original nullable contract by changing the kcal declaration back to
number | null in the dining entity (kcal) or, if you prefer a non-nullable
client model, add a parsing/normalization step (e.g., in the DTO/mapper that
constructs the dining entity) that converts backend nulls to a deterministic
value (like 0 or undefined) before populating the kcal property so the runtime
and the TypeScript type remain consistent.

menu: string[];
image_url: string | null;
created_at: string;
Expand Down
1 change: 1 addition & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ export * as timetable from './timetable';
export * as uploadFile from './uploadFile';
export * as graduationCalculator from './graduationCalculator';
export * as callvan from './callvan';
export * as weather from './weather';
18 changes: 18 additions & 0 deletions src/api/store/APIDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
StoreDetailResponse,
StoreDetailMenuResponse,
StoreCategoriesResponse,
StoreCountsResponse,
StoreEventCountResponse,
StoreBenefitCategoryResponse,
AllStoreEventResponse,
StoreEventListResponse,
Expand Down Expand Up @@ -103,6 +105,14 @@ export class StoreCategories<R extends StoreCategoriesResponse> implements APIRe
}
}

export class StoreCounts<R extends StoreCountsResponse> implements APIRequest<R> {
method = HTTP_METHOD.GET;

response!: R;

path = 'shops/count';
}

export class AllStoreEvent<R extends AllStoreEventResponse> implements APIRequest<R> {
method = HTTP_METHOD.GET;

Expand All @@ -115,6 +125,14 @@ export class AllStoreEvent<R extends AllStoreEventResponse> implements APIReques
}
}

export class StoreEventCount<R extends StoreEventCountResponse> implements APIRequest<R> {
method = HTTP_METHOD.GET;

response!: R;

path = 'shops/events/count';
}

export class StoreEventList<R extends StoreEventListResponse> implements APIRequest<R> {
method = HTTP_METHOD.GET;

Expand Down
9 changes: 9 additions & 0 deletions src/api/store/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ export interface StoreCategoriesResponse extends APIResponse {
shop_categories: StoreCategory[];
}

export interface StoreCountsResponse extends APIResponse {
total_count: number;
open_count: number;
}

export interface StoreEventCountResponse extends APIResponse {
count: number;
}

export interface StoreCategory {
id: number;
name: string;
Expand Down
6 changes: 6 additions & 0 deletions src/api/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import {
StoreDetailInfo,
StoreDetailMenu,
StoreCategories,
StoreCounts,
AllStoreEvent,
StoreEventCount,
StoreEventList,
StoreBenefitList,
StoreBenefitCategory,
Expand All @@ -30,8 +32,12 @@ export const getStoreBenefitCategory = APIClient.of(StoreBenefitCategory);

export const getStoreCategories = APIClient.of(StoreCategories);

export const getStoreCounts = APIClient.of(StoreCounts);

export const getAllEvent = APIClient.of(AllStoreEvent);

export const getStoreEventCount = APIClient.of(StoreEventCount);

export const getStoreEventList = APIClient.of(StoreEventList);

export const getReviewList = APIClient.of(ReviewList);
Expand Down
16 changes: 16 additions & 0 deletions src/api/store/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import {
getStoreBenefitCategory,
getStoreBenefitList,
getStoreCategories,
getStoreCounts,
getStoreDetailInfo,
getStoreDetailMenu,
getStoreEventCount,
getStoreEventList,
getStoreListV2,
} from './index';
Expand All @@ -36,6 +38,8 @@ export function getStoreReviewViewerScope(token?: string): StoreReviewViewerScop
export const storeQueryKeys = {
all: ['store'] as const,
categories: () => [...storeQueryKeys.all, 'categories'] as const,
counts: () => [...storeQueryKeys.all, 'counts'] as const,
eventCount: () => [...storeQueryKeys.all, 'event-count'] as const,
listV2: ({ sorter, filter, query }: StoreListQueryParams) =>
[...storeQueryKeys.all, 'list-v2', { sorter, filter, query: query ?? '' }] as const,
allEvents: () => [...storeQueryKeys.all, 'all-events'] as const,
Expand All @@ -62,6 +66,18 @@ export const storeQueries = {
queryFn: getStoreCategories,
}),

counts: () =>
queryOptions({
queryKey: storeQueryKeys.counts(),
queryFn: getStoreCounts,
}),

eventCount: () =>
queryOptions({
queryKey: storeQueryKeys.eventCount(),
queryFn: getStoreEventCount,
}),

listV2: ({ sorter, filter, query }: StoreListQueryParams) =>
queryOptions({
queryKey: storeQueryKeys.listV2({ sorter, filter, query }),
Expand Down
12 changes: 12 additions & 0 deletions src/api/weather/APIDetail.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { APIRequest, HTTP_METHOD } from 'interfaces/APIRequest';
import { WeatherResponse } from './entity';

export class WeatherInfo<R extends WeatherResponse> implements APIRequest<R> {
method = HTTP_METHOD.GET;

path = '/weather';

response!: R;

auth = false;
}
10 changes: 10 additions & 0 deletions src/api/weather/entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { APIResponse } from 'interfaces/APIResponse';

export type WeatherId = 1 | 2 | 3 | 4 | 5 | 6 | 7;

export interface WeatherResponse extends APIResponse {
temperature: number;
weather: string;
weather_id: WeatherId;
weather_icon_url: string;
}
4 changes: 4 additions & 0 deletions src/api/weather/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import APIClient from 'utils/ts/apiClient';
import { WeatherInfo } from './APIDetail';

export const getWeatherInfo = APIClient.of(WeatherInfo);
15 changes: 15 additions & 0 deletions src/api/weather/queries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { queryOptions } from '@tanstack/react-query';
import { getWeatherInfo } from './index';

export const weatherQueryKeys = {
all: ['weather'] as const,
info: () => [...weatherQueryKeys.all, 'info'] as const,
};

export const weatherQueries = {
info: () =>
queryOptions({
queryKey: weatherQueryKeys.info(),
queryFn: getWeatherInfo,
}),
};
3 changes: 3 additions & 0 deletions src/assets/svg/common/arrow-right-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/assets/svg/common/bbico-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svg/common/bus-time-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svg/common/category-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/svg/common/clipboard-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svg/common/fork-knife-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/svg/common/home-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading