File tree Expand file tree Collapse file tree 4 files changed +4
-12
lines changed
Expand file tree Collapse file tree 4 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -96,16 +96,6 @@ const HeaderActions = () => {
9696 { intl . formatMessage ( messages . newContentButton ) }
9797 </ Button >
9898 ) }
99- { /* This button is temporal in this commit */ }
100- < Button
101- className = "ml-1"
102- iconBefore = { Add }
103- variant = "primary rounded-0"
104- onClick = { openAddContentSidebar }
105- disabled = { readOnly }
106- >
107- Add Content
108- </ Button >
10999 </ div >
110100 ) ;
111101} ;
Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ export const useUpdateContainer = (containerId: string) => {
637637/**
638638 * Get the metadata and children for a container in a library
639639 */
640- export const useContainerChildren = ( containerId : string ) => (
640+ export const useContainerChildren = ( containerId ? : string ) => (
641641 useQuery ( {
642642 enabled : ! ! containerId ,
643643 queryKey : containerQueryKeys . children ( containerId ) ,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export const LibraryUnitBlocks = () => {
4242 isLoading,
4343 isError,
4444 error,
45- } = useContainerChildren ( libraryId , unitId ) ;
45+ } = useContainerChildren ( unitId ) ;
4646
4747 useEffect ( ( ) => setOrderedBlocks ( blocks || [ ] ) , [ blocks ] ) ;
4848
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const HeaderActions = () => {
2626
2727 const { unitId, readOnly } = useLibraryContext ( ) ;
2828 const {
29+ openAddContentSidebar,
2930 closeLibrarySidebar,
3031 openUnitInfoSidebar,
3132 sidebarComponentInfo,
@@ -64,6 +65,7 @@ const HeaderActions = () => {
6465 iconBefore = { Add }
6566 variant = "primary rounded-0"
6667 disabled = { readOnly }
68+ onClick = { openAddContentSidebar }
6769 >
6870 { intl . formatMessage ( messages . newContentButton ) }
6971 </ Button >
You can’t perform that action at this time.
0 commit comments