1.1.1
This commit is contained in:
@@ -39,6 +39,7 @@ import { ServerVersionsResponse } from './types/ServerVersionsResponse'
|
||||
import { GameVersion } from './types/GameVersion'
|
||||
import { Game } from './types/Game'
|
||||
import { listen } from '@tauri-apps/api/event'
|
||||
import { usePathname } from 'next/navigation'
|
||||
|
||||
const roboto = Roboto({
|
||||
subsets: ['latin']
|
||||
@@ -78,6 +79,8 @@ export default function RootLayout ({
|
||||
}
|
||||
}
|
||||
|
||||
const pathname = usePathname()
|
||||
|
||||
const notifyUser = useCallback(
|
||||
async (title: string, body: string) => {
|
||||
if (!normalConfig?.settings.allowNotifications) return
|
||||
@@ -512,7 +515,11 @@ export default function RootLayout ({
|
||||
<button
|
||||
className='close-button'
|
||||
onClick={() => {
|
||||
if (popupMode == 0 && selectedGame) {
|
||||
if (
|
||||
popupMode == 0 &&
|
||||
selectedGame &&
|
||||
pathname === '/'
|
||||
) {
|
||||
setSelectedGame(null)
|
||||
setSelectedVersionList([])
|
||||
} else {
|
||||
@@ -523,7 +530,7 @@ export default function RootLayout ({
|
||||
>
|
||||
<FontAwesomeIcon
|
||||
icon={
|
||||
popupMode == 0 && selectedGame
|
||||
popupMode == 0 && selectedGame && pathname === '/'
|
||||
? faChevronLeft
|
||||
: faXmark
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user