From cf9b7b3d0b45e50e6e966082387cf9b87446453a Mon Sep 17 00:00:00 2001 From: dank074 Date: Tue, 15 Nov 2022 23:53:12 -0600 Subject: [PATCH] open trax songs catalog page on button click --- .../furniture/playlist-editor/DiskInventoryView.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/room/widgets/furniture/playlist-editor/DiskInventoryView.tsx b/src/components/room/widgets/furniture/playlist-editor/DiskInventoryView.tsx index 407fdce2..11bb6da0 100644 --- a/src/components/room/widgets/furniture/playlist-editor/DiskInventoryView.tsx +++ b/src/components/room/widgets/furniture/playlist-editor/DiskInventoryView.tsx @@ -1,6 +1,6 @@ import { IAdvancedMap, MusicPriorities } from '@nitrots/nitro-renderer'; import { FC, MouseEvent, useCallback, useEffect, useState } from 'react'; -import { GetConfiguration, GetDiskColor, GetNitroInstance, LocalizeText } from '../../../../../api'; +import { CatalogPageName, CreateLinkEvent, GetConfiguration, GetDiskColor, GetNitroInstance, LocalizeText } from '../../../../../api'; import { AutoGrid, Base, Button, Flex, LayoutGridItem, Text } from '../../../../../common'; export interface DiskInventoryViewProps @@ -29,6 +29,11 @@ export const DiskInventoryView: FC = props => addToPlaylist(diskId, GetNitroInstance().soundManager.musicController?.getRoomItemPlaylist()?.length) }, [ addToPlaylist ]); + const openCatalogPage = () => + { + CreateLinkEvent('catalog/open/' + CatalogPageName.TRAX_SONGS); + } + useEffect(() => { if(previewSongId === -1) return; @@ -82,7 +87,7 @@ export const DiskInventoryView: FC = props =>
{ LocalizeText('playlist.editor.text.get.more.music') }
{ LocalizeText('playlist.editor.text.you.have.no.songdisks.available') }
{ LocalizeText('playlist.editor.text.you.can.buy.some.from.the.catalogue') }
- + );