feat: 내 각 아이콘·상세, 이야기 내 글·무한 스크롤, 공유 이미지 얇은 띠, 행사 주소 수집
- 내 각: 아이콘 고르기(my_gak.icon), 카드는 아이콘·점수·아쉬운 조건만, 눌러서 상세(시간대·조건별 점수), 공유는 공통 공유 창 - 이야기: 오늘 쓴 내 글 묶음, '내 글' 칩·탭, 무한 스크롤, 사진 카메라 버튼, 지우기 확인, ⋯ 메뉴 하트 옆, 글 시간 서버 계산(1일 전) - 공유 이미지: 1:1·4:5 는 아래 얇은 띠 한 줄로 카드를 크게 - 행사: 수집 때 주소 저장(event.address), 행사 포스트에 장소·주소·기간 - 히어로 말풍선 '오늘 낮은 / 내일 낮은', 내일을 볼 때 배경도 따라감, 달 보름 순간이 낮이면 뜨는 시각으로 - 단풍 지도 피드 맨 위, 행사·계절 띠 포스트 틀 되돌림, 쇼츠 홈 버튼 가림·닫기 버튼, 하단 여백, 회색 글자 대비 - 토스 앱에선 쇼츠 플레이어를 하나만 띄움
This commit is contained in:
1 parent
3a249c509d
commit
ffe6153148
35 files changed
+566
-185
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import { useInfiniteQuery, useQuery } from '@tanstack/react-query'
|
||||
import { listMyTalksInfiniteOptions, listTalksInfiniteOptions, talkGroupsOptions } from '@nalssigak/shared/api/client/@tanstack/react-query.gen'
|
||||
import { useState } from 'react'
|
||||
import { listMyTalksInfiniteOptions, listMyTalksOptions, listTalksInfiniteOptions, talkGroupsOptions } from '@nalssigak/shared/api/client/@tanstack/react-query.gen'
|
||||
import { TalkTopic, type TalkData } from '@nalssigak/shared/api/client/types.gen'
|
||||
import { kst } from '@nalssigak/shared/lib'
|
||||
import { useRegion } from './regionContext'
|
||||
|
||||
// 글 주제와 피드 묶음 이름
|
||||
@@ -37,10 +39,22 @@ export function useTopicTalks(topic?: TalkTopic) {
|
||||
}
|
||||
}
|
||||
|
||||
/** 오늘(한국 날짜) 쓴 내 글, 최신순. 로그인했을 때만 받는다 */
|
||||
export function useTodayMyTalks(loggedIn: boolean) {
|
||||
const q = useQuery({ ...listMyTalksOptions(), enabled: loggedIn })
|
||||
// 오늘 날짜는 화면을 연 때 기준으로 한 번만
|
||||
const [now] = useState(() => kst(new Date()))
|
||||
return (q.data?.talks ?? []).filter((t) => {
|
||||
const d = kst(t.created_at)
|
||||
return d.y === now.y && d.mo === now.mo && d.d === now.d
|
||||
})
|
||||
}
|
||||
|
||||
/** 내가 쓴 글 (최신순) */
|
||||
export function useMyTalks() {
|
||||
export function useMyTalks(enabled = true) {
|
||||
const list = useInfiniteQuery({
|
||||
...listMyTalksInfiniteOptions(),
|
||||
enabled,
|
||||
initialPageParam: {},
|
||||
getNextPageParam: (last) => last.next_cursor ?? undefined,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user