Skip to content

Hide listen to player on non-english pages #15170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/ListenToPlayer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { useContext, useEffect, useState } from "react"
import { Howl } from "howler"
import { useLocale } from "next-intl"
import { Portal } from "@radix-ui/react-portal"

import PlayerWidget from "@/components/ListenToPlayer/PlayerWidget"
Expand All @@ -16,6 +17,7 @@ import { FeedbackWidgetContext } from "@/contexts/FeedbackWidgetContext"
import { useTranslation } from "@/hooks/useTranslation"

const ListenToPlayer = ({ slug }: { slug: string }) => {
const locale = useLocale()
const { setShowFeedbackWidget } = useContext(FeedbackWidgetContext)
const { playlist, index } = getPlaylistBySlug(slug)

Expand Down Expand Up @@ -209,6 +211,8 @@ const ListenToPlayer = ({ slug }: { slug: string }) => {

if (!playlist.length || index === -1) return null

if (locale !== "en") return null

return (
<>
<TopOfPagePlayer
Expand Down