Merge branch 'feat/weather-saju' — 내 레벨 창 스크롤
This commit is contained in:
commit
dac9f7b8e0
3 files changed
+6
-3
No files matched your search
@@ -156,11 +156,14 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
|
|||||||
const root = document.documentElement
|
const root = document.documentElement
|
||||||
const before = root.style.overflow
|
const before = root.style.overflow
|
||||||
root.style.overflow = 'hidden'
|
root.style.overflow = 'hidden'
|
||||||
|
// 창 안에서 끝까지 밀어도 뒤 페이지로 넘어가지 않게
|
||||||
|
root.style.overscrollBehavior = 'none'
|
||||||
// 뒤 화면 움직임 멈추기는 페이지 전체 스타일을 다시 계산하게 해서, 창이 다 올라온 뒤에 한다
|
// 뒤 화면 움직임 멈추기는 페이지 전체 스타일을 다시 계산하게 해서, 창이 다 올라온 뒤에 한다
|
||||||
const pause = setTimeout(() => root.classList.add('b-sheet-open'), SHEET_OPEN_MS)
|
const pause = setTimeout(() => root.classList.add('b-sheet-open'), SHEET_OPEN_MS)
|
||||||
return () => {
|
return () => {
|
||||||
clearTimeout(pause)
|
clearTimeout(pause)
|
||||||
root.style.overflow = before
|
root.style.overflow = before
|
||||||
|
root.style.overscrollBehavior = ''
|
||||||
root.classList.remove('b-sheet-open')
|
root.classList.remove('b-sheet-open')
|
||||||
}
|
}
|
||||||
}, [isOpen])
|
}, [isOpen])
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ export function TarotSheet() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="px-4 pb-2">
|
<div className="flex-1 overflow-auto overscroll-contain px-4 pb-2">
|
||||||
{!card ? (
|
{!card ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export function LevelSheet() {
|
|||||||
if (!level) return null
|
if (!level) return null
|
||||||
const steps = (level.unlocks ?? []).reduce<Record<number, string[]>>((m, u) => ({ ...m, [u.level]: [...(m[u.level] ?? []), u.name] }), {})
|
const steps = (level.unlocks ?? []).reduce<Record<number, string[]>>((m, u) => ({ ...m, [u.level]: [...(m[u.level] ?? []), u.name] }), {})
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4 px-4 pb-4">
|
<div className="flex flex-1 flex-col gap-4 overflow-auto overscroll-contain px-4 pt-3.5 pb-4">
|
||||||
<LevelCard link={false} />
|
<LevelCard link={false} />
|
||||||
<section>
|
<section>
|
||||||
<h4 className="m-0 mb-2 text-sm font-extrabold">오늘 받을 수 있는 각</h4>
|
<h4 className="m-0 mb-2 text-sm font-extrabold">오늘 받을 수 있는 각</h4>
|
||||||
@@ -212,7 +212,7 @@ export function LevelUpSheet({ level: lv }: { level: number }) {
|
|||||||
const opened = unlocks.map((u) => u.name)
|
const opened = unlocks.map((u) => u.name)
|
||||||
const name = level?.levels?.find((l) => l.level === lv)?.name
|
const name = level?.levels?.find((l) => l.level === lv)?.name
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-center gap-2 px-6 pt-2 pb-6 text-center">
|
<div className="flex flex-1 flex-col items-center gap-2 overflow-auto overscroll-contain px-6 pt-2 pb-6 text-center">
|
||||||
<Ic name={levelIcon(lv)} className="size-24" />
|
<Ic name={levelIcon(lv)} className="size-24" />
|
||||||
<b className="font-jua text-[28px] font-normal">
|
<b className="font-jua text-[28px] font-normal">
|
||||||
Lv.{lv} {name}
|
Lv.{lv} {name}
|
||||||
|
|||||||
Reference in new issue
Block a user