feat: 10/20 회의 반영 — 이야기 탭을 오늘 피드로 합침(글쓰기 칸·사진 올리기·위치 정보 삭제), 오늘의 각 카드와 히어로·각 공유 템플릿, 나만의 각을 이름+날씨 조건 저장으로, 로그인 없이 좋아요(IP 해시), 피드 순서·불쾌지수 상시·포스트 그림 배경, 새 각 아이콘
This commit is contained in:
1 parent
017022a0b0
commit
d0213f41a6
81 files changed
+3503
-593
No files matched your search
@@ -26,7 +26,6 @@ import { cx } from '../lib/utils'
|
||||
import { useAuth } from './authContext'
|
||||
import { ago, ARTICLE_CAT, articleMeta, AVATAR_COLORS, cardBg, CHARACTERS, dateRange, loadOf, MOODS, shortDay } from './lib'
|
||||
import { MixSheet } from './myGak'
|
||||
import { useMyGak } from './myGakState'
|
||||
import { ownPage, useRegion } from './regionContext'
|
||||
import { useSky } from './skyContext'
|
||||
import { SHARE_SIZES, shareImage, type ShareSize } from './storyImage'
|
||||
@@ -134,7 +133,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
|
||||
{state.type === 'login' && <LoginSheet onDone={onClose} onLoggedIn={then ? () => open(then) : onClose} />}
|
||||
{state.type === 'me' && <MeSheet onDone={onClose} />}
|
||||
{state.type === 'region' && <RegionSheet onDone={onClose} />}
|
||||
{state.type === 'mix' && <MixSheet ids={state.ids} shared={state.shared} onDone={onClose} />}
|
||||
{state.type === 'mix' && <MixSheet shared={state.shared} onDone={onClose} />}
|
||||
</div>
|
||||
)}
|
||||
{!state && <RegionLinks />}
|
||||
@@ -326,8 +325,6 @@ function Radar({ name, factors, size = 250 }: { name: string; factors: Factor[];
|
||||
|
||||
function GakSheet({ indexId, onTitle }: { indexId: number; onTitle: (t: string) => void }) {
|
||||
const { region } = useRegion()
|
||||
const { open } = useSheet()
|
||||
const { mixable } = useMyGak()
|
||||
const q = useQuery(getIndexOptions({ path: { index_id: indexId }, query: { region: region.code } }))
|
||||
const d: ResIndexDetail | undefined = q.data
|
||||
const g = d?.index
|
||||
@@ -360,11 +357,6 @@ function GakSheet({ indexId, onTitle }: { indexId: number; onTitle: (t: string)
|
||||
<b className={cx('ml-auto font-bagel text-[42px] font-normal', g.active ? 'text-(--orange)' : 'text-(--ink3)')}>{g.score}</b>
|
||||
</div>
|
||||
{!g.active && <p className="mt-2 text-[13px] font-bold text-(--ink2)">지금 시간대엔 해당 없어요. 점수는 오늘 가장 좋은 시간대 기준이에요.</p>}
|
||||
{mixable.has(g.index_id) && (
|
||||
<button type="button" onClick={() => open({ type: 'mix', ids: [g.index_id] })} className="mt-2.5 w-full cursor-pointer rounded-2xl bg-[#fff4ec] py-2.5 font-jua text-[15.5px] text-(--orange)">
|
||||
다른 각과 섞어 내 각 만들기
|
||||
</button>
|
||||
)}
|
||||
{now && (
|
||||
<p className="mt-3 rounded-2xl bg-[#fff4ec] px-3.5 py-2.5 text-[14.5px] font-bold">
|
||||
<b className="mr-1.5 font-jua font-normal text-(--orange)">{now.low}~{now.high}점</b>
|
||||
@@ -624,8 +616,6 @@ const EMOJIS = ['☀️', '🌂', '🍻', '🌇', '😍', '👍']
|
||||
|
||||
function CommentRow({ c, postId }: { c: CommentData; postId: number }) {
|
||||
const { region } = useRegion()
|
||||
const { loggedIn } = useAuth()
|
||||
const { open } = useSheet()
|
||||
const queryClient = useQueryClient()
|
||||
const [liked, setLiked] = useState(c.liked)
|
||||
const [count, setCount] = useState(c.like_count)
|
||||
@@ -636,7 +626,6 @@ function CommentRow({ c, postId }: { c: CommentData; postId: number }) {
|
||||
const [likeFailed, setLikeFailed] = useState(false)
|
||||
|
||||
const toggle = () => {
|
||||
if (!loggedIn) return open({ type: 'login' })
|
||||
if (like.isPending || unlike.isPending) return
|
||||
const next = !liked
|
||||
setLikeFailed(false)
|
||||
|
||||
Reference in new issue
Block a user