Add unique key for draggable

This commit is contained in:
Bill 2021-08-09 12:15:08 -04:00
parent e8a5bca6c9
commit 812a0a80d6
7 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@ export const AchievementsView: FC<AchievementsViewProps> = props =>
<AchievementsContextProvider value={ { achievementsState, dispatchAchievementsState } }> <AchievementsContextProvider value={ { achievementsState, dispatchAchievementsState } }>
<AchievementsMessageHandler /> <AchievementsMessageHandler />
{ isVisible && { isVisible &&
<NitroCardView className="nitro-achievements"> <NitroCardView uniqueKey="achievements" className="nitro-achievements">
<NitroCardHeaderView headerText={ LocalizeText('inventory.achievements') } onCloseClick={ event => setIsVisible(false) } /> <NitroCardHeaderView headerText={ LocalizeText('inventory.achievements') } onCloseClick={ event => setIsVisible(false) } />
<NitroCardContentView> <NitroCardContentView>
<div className="row"> <div className="row">

View File

@ -276,7 +276,7 @@ export const AvatarEditorView: FC<AvatarEditorViewProps> = props =>
if(!isVisible || !figureData) return null; if(!isVisible || !figureData) return null;
return ( return (
<NitroCardView className="nitro-avatar-editor"> <NitroCardView uniqueKey="avatar-editor" className="nitro-avatar-editor">
<NitroCardHeaderView headerText={ LocalizeText('avatareditor.title') } onCloseClick={ event => setIsVisible(false) } /> <NitroCardHeaderView headerText={ LocalizeText('avatareditor.title') } onCloseClick={ event => setIsVisible(false) } />
<NitroCardTabsView> <NitroCardTabsView>
{ categories && (categories.size > 0) && Array.from(categories.keys()).map(category => { categories && (categories.size > 0) && Array.from(categories.keys()).map(category =>

View File

@ -190,7 +190,7 @@ export const CatalogView: FC<CatalogViewProps> = props =>
<CatalogContextProvider value={ { catalogState, dispatchCatalogState } }> <CatalogContextProvider value={ { catalogState, dispatchCatalogState } }>
<CatalogMessageHandler /> <CatalogMessageHandler />
{ isVisible && { isVisible &&
<NitroCardView className="nitro-catalog"> <NitroCardView uniqueKey="catalog" className="nitro-catalog">
<NitroCardHeaderView headerText={ LocalizeText('catalog.title') } onCloseClick={ event => { saveActivePages(); setIsVisible(false); } } /> <NitroCardHeaderView headerText={ LocalizeText('catalog.title') } onCloseClick={ event => { saveActivePages(); setIsVisible(false); } } />
<NitroCardTabsView> <NitroCardTabsView>
{ root && root.children.length && root.children.map((page, index) => { root && root.children.length && root.children.map((page, index) =>

View File

@ -84,7 +84,7 @@ export const FriendListView: FC<FriendListViewProps> = props =>
<FriendListMessageHandler /> <FriendListMessageHandler />
{ isReady && createPortal(<FriendBarView />, document.getElementById('toolbar-friend-bar-container')) } { isReady && createPortal(<FriendBarView />, document.getElementById('toolbar-friend-bar-container')) }
{ isVisible && { isVisible &&
<NitroCardView className="nitro-friend-list"> <NitroCardView uniqueKey="friend-list" className="nitro-friend-list">
<NitroCardHeaderView headerText={ LocalizeText('friendlist.friends') } onCloseClick={ event => setIsVisible(false) } /> <NitroCardHeaderView headerText={ LocalizeText('friendlist.friends') } onCloseClick={ event => setIsVisible(false) } />
<NitroCardContentView> <NitroCardContentView>
<div className="text-black fw-bold">{ LocalizeText('friendlist.search.friendscaption') }</div> <div className="text-black fw-bold">{ LocalizeText('friendlist.search.friendscaption') }</div>

View File

@ -197,7 +197,7 @@ export const InventoryView: FC<InventoryViewProps> = props =>
<InventoryContextProvider value={ { furnitureState, dispatchFurnitureState, botState, dispatchBotState, petState, dispatchPetState, badgeState, dispatchBadgeState, unseenTracker } }> <InventoryContextProvider value={ { furnitureState, dispatchFurnitureState, botState, dispatchBotState, petState, dispatchPetState, badgeState, dispatchBadgeState, unseenTracker } }>
<InventoryMessageHandler /> <InventoryMessageHandler />
{ isVisible && { isVisible &&
<NitroCardView className="nitro-inventory"> <NitroCardView uniqueKey={ 'inventory' } className="nitro-inventory">
<NitroCardHeaderView headerText={ LocalizeText('inventory.title') } onCloseClick={ close } /> <NitroCardHeaderView headerText={ LocalizeText('inventory.title') } onCloseClick={ close } />
{ !furnitureState.tradeData && { !furnitureState.tradeData &&
<> <>

View File

@ -161,7 +161,7 @@ export const ModToolsView: FC<ModToolsViewProps> = props =>
return ( return (
<ModToolsContextProvider value={ { modToolsState, dispatchModToolsState } }> <ModToolsContextProvider value={ { modToolsState, dispatchModToolsState } }>
{ isVisible && { isVisible &&
<NitroCardView className="nitro-mod-tools" simple={ true }> <NitroCardView uniqueKey="mod-tools" className="nitro-mod-tools" simple={ true }>
<NitroCardHeaderView headerText={ "Mod Tools" } onCloseClick={ event => setIsVisible(false) } /> <NitroCardHeaderView headerText={ "Mod Tools" } onCloseClick={ event => setIsVisible(false) } />
<NitroCardContentView className="text-black"> <NitroCardContentView className="text-black">
<button className="btn btn-primary w-100 mb-2" onClick={ () => handleClick('toggle_room') } disabled={ !currentRoomId }><i className="fas fa-home"></i> Room Tool</button> <button className="btn btn-primary w-100 mb-2" onClick={ () => handleClick('toggle_room') } disabled={ !currentRoomId }><i className="fas fa-home"></i> Room Tool</button>

View File

@ -139,7 +139,7 @@ export const NavigatorView: FC<NavigatorViewProps> = props =>
<NavigatorContextProvider value={ { navigatorState, dispatchNavigatorState } }> <NavigatorContextProvider value={ { navigatorState, dispatchNavigatorState } }>
<NavigatorMessageHandler /> <NavigatorMessageHandler />
{ isVisible && { isVisible &&
<NitroCardView className="nitro-navigator"> <NitroCardView uniqueKey="navigator" className="nitro-navigator">
<NitroCardHeaderView headerText={ LocalizeText(isCreatorOpen ? 'navigator.createroom.title' : 'navigator.title') } onCloseClick={ event => setIsVisible(false) } /> <NitroCardHeaderView headerText={ LocalizeText(isCreatorOpen ? 'navigator.createroom.title' : 'navigator.title') } onCloseClick={ event => setIsVisible(false) } />
<NitroCardTabsView> <NitroCardTabsView>
{ topLevelContexts.map((context, index) => { topLevelContexts.map((context, index) =>