fix: remove corner player in entry column

This commit is contained in:
Stephen Zhou
2024-11-25 21:06:47 +08:00
parent 1182497f6b
commit fdb466bf4b
3 changed files with 1 additions and 8 deletions
@@ -1,6 +1,5 @@
import { useEffect, useState } from "react"
import { useAudioPlayerAtomSelector } from "~/atoms/player"
import { useGeneralSettingKey } from "~/atoms/settings/general"
import { ROUTE_FEED_PENDING } from "~/constants/app"
import { ENTRY_COLUMN_LIST_SCROLLER_ID, LOGO_MOBILE_ID } from "~/constants/dom"
@@ -11,8 +10,6 @@ import { EntryColumn } from "~/modules/entry-column"
import { MobileFloatBar } from "../feed-column/float-bar.mobile"
export const EntryColumnMobile = () => {
const isShowingPlayer = useAudioPlayerAtomSelector((v) => v.show)
const isStartupTimeline = useGeneralSettingKey("startupScreen") === "timeline"
const [scrollContainer, setScrollContainer] = useState<null | HTMLDivElement>(null)
@@ -31,7 +28,6 @@ export const EntryColumnMobile = () => {
{isStartupTimeline && (
<MobileFloatBar
className={isShowingPlayer ? "!bottom-safe-offset-28" : "!bottom-safe-offset-10"}
scrollContainer={scrollContainer}
onLogoClick={() => {
;(document.querySelector(`#${LOGO_MOBILE_ID}`) as HTMLElement)?.click()
@@ -152,7 +152,7 @@ const PlayerIcon = () => {
</button>
{isShowPlayer && (
<CornerPlayer className="absolute bottom-12 left-0 w-full max-w-[350px] overflow-hidden rounded-r-lg" />
<CornerPlayer className="absolute inset-x-0 bottom-12 mx-auto w-full max-w-[350px] overflow-hidden rounded-lg" />
)}
</>
)
@@ -6,7 +6,6 @@ import { forwardRef, useState } from "react"
import { PullToRefresh } from "~/components/ux/pull-to-refresh"
import { useRouteParamsSelector } from "~/hooks/biz/useRouteParams"
import { CornerPlayer } from "../player/corner-player"
import type { EntryColumnWrapperProps } from "./wrapper.shared"
import { styles } from "./wrapper.shared"
@@ -28,8 +27,6 @@ export const EntryColumnWrapper = forwardRef<HTMLDivElement, EntryColumnWrapperP
</ScrollElementContext.Provider>
</PullToRefresh>
</div>
<CornerPlayer className="w-full !mb-safe md:w-[350px]" />
</div>
)
},