Hide discord & back button with launcher
This commit is contained in:
1 file changed
+5
-1
@@ -7,6 +7,7 @@ import { BirdColor } from '../chatroom/page'
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { GetIconForUser } from '@/util/bd'
|
import { GetIconForUser } from '@/util/bd'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
import { useSearchParams } from 'next/navigation'
|
||||||
|
|
||||||
interface BaseEntry {
|
interface BaseEntry {
|
||||||
id: number
|
id: number
|
||||||
@@ -86,6 +87,7 @@ export default function BerryDashLeaderboards () {
|
|||||||
const [entries, setEntries] = useState<(LeaderboardEntry | Account)[]>([])
|
const [entries, setEntries] = useState<(LeaderboardEntry | Account)[]>([])
|
||||||
const backButtonRef = useRef<HTMLAnchorElement>(null)
|
const backButtonRef = useRef<HTMLAnchorElement>(null)
|
||||||
const backButtonRef2 = useRef<HTMLButtonElement>(null)
|
const backButtonRef2 = useRef<HTMLButtonElement>(null)
|
||||||
|
const params = useSearchParams()
|
||||||
|
|
||||||
const Refresh = useCallback(async () => {
|
const Refresh = useCallback(async () => {
|
||||||
setGettingEntries(true)
|
setGettingEntries(true)
|
||||||
@@ -158,7 +160,9 @@ export default function BerryDashLeaderboards () {
|
|||||||
return (
|
return (
|
||||||
<div className='box'>
|
<div className='box'>
|
||||||
{selected == -1 ? (
|
{selected == -1 ? (
|
||||||
|
!params.get('launcher') && (
|
||||||
<BackButton href='/game/berry-dash' refLink={backButtonRef} />
|
<BackButton href='/game/berry-dash' refLink={backButtonRef} />
|
||||||
|
)
|
||||||
) : (
|
) : (
|
||||||
<BackButton
|
<BackButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -170,7 +174,7 @@ export default function BerryDashLeaderboards () {
|
|||||||
refButton={backButtonRef2}
|
refButton={backButtonRef2}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<DiscordButton />
|
{!params.get('launcher') && <DiscordButton />}
|
||||||
<p className='px-20 mb-2 -mt-2 text-center text-2xl'>
|
<p className='px-20 mb-2 -mt-2 text-center text-2xl'>
|
||||||
Berry Dash Leaderboards
|
Berry Dash Leaderboards
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in new issue
Block a user