Fix react warning, fix dom issues
This commit is contained in:
@ -31,6 +31,20 @@ import './styles/main.css';
|
||||
|
||||
const ROOT_ID = 'nc-root';
|
||||
|
||||
/**
|
||||
* Very hacky. This suppresses the "You are importing createRoot from "react-dom" which
|
||||
* is not supported. You should instead import it from "react-dom/client"." warning.
|
||||
*
|
||||
* Not sure why this is necessary as we import from "react-dom/client" as we should.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, import/order
|
||||
import ReactDOM from 'react-dom';
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = true;
|
||||
|
||||
const TranslatedApp = ({ locale, config }: AppRootProps) => {
|
||||
if (!config) {
|
||||
return null;
|
||||
|
@ -122,10 +122,14 @@ const EntryListing = ({
|
||||
|
||||
if (viewStyle === 'VIEW_STYLE_LIST') {
|
||||
return (
|
||||
<Table columns={!isSingleCollectionInList ? ['Collection', ...summaryFields] : summaryFields}>
|
||||
{renderedCards}
|
||||
<>
|
||||
<Table
|
||||
columns={!isSingleCollectionInList ? ['Collection', ...summaryFields] : summaryFields}
|
||||
>
|
||||
{renderedCards}
|
||||
</Table>
|
||||
{hasMore && handleLoadMore && <Waypoint key={page} onEnter={handleLoadMore} />}
|
||||
</Table>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -40,13 +40,12 @@ const Sidebar: FC<TranslateProps> = ({ t }) => {
|
||||
|
||||
if ('nested' in collection) {
|
||||
return (
|
||||
<li key={`nested-${collectionName}`}>
|
||||
<NestedCollection
|
||||
collection={collection}
|
||||
filterTerm={filterTerm}
|
||||
data-testid={collectionName}
|
||||
/>
|
||||
</li>
|
||||
<NestedCollection
|
||||
key={`nested-${collectionName}`}
|
||||
collection={collection}
|
||||
filterTerm={filterTerm}
|
||||
data-testid={collectionName}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ import type {
|
||||
TText,
|
||||
WithOverride,
|
||||
} from '@udecode/plate';
|
||||
import type { CSSProperties } from 'styled-components';
|
||||
import type { CSSProperties } from 'react';
|
||||
|
||||
export const ELEMENT_SHORTCODE = 'shortcode' as const;
|
||||
|
||||
|
Reference in New Issue
Block a user