Skip to content

Commit dceded0

Browse files
Na1gaeCopilot
andcommitted
Update src/notification/usecases/createGrowNotification.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 697b7d8 commit dceded0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/notification/usecases/createGrowNotification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class CreateGrowNotificationUseCase {
2929

3030
const treeType = TREE_TYPES_MAP[param.treeType];
3131
const treeTypeName = treeType?.name ?? '나무';
32-
const treeLevelIndex = Math.max(1, Math.min(param.treeLevel, treeType?.levels?.length ?? 1)) - 1;
32+
const treeLevelIndex = Math.max(0, Math.min(param.treeLevel - 1, (treeType?.levels?.length ?? 1) - 1));
3333
const treeThumbnailUrl = treeType?.levels?.[treeLevelIndex]?.imageUrl;
3434
const displayContent = `${restaurant.name ?? '레스토랑'}의 <b>${treeTypeName}</b> 나무가 ${param.treeLevel}단계가 되었어요.`;
3535
const deeplink = `groo://restaurant/${param.restaurantId}`;

0 commit comments

Comments
 (0)