Fix react warning, fix dom issues
This commit is contained in:
parent
4264218439
commit
2469b8bbfe
@ -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}>
|
||||
<>
|
||||
<Table
|
||||
columns={!isSingleCollectionInList ? ['Collection', ...summaryFields] : summaryFields}
|
||||
>
|
||||
{renderedCards}
|
||||
{hasMore && handleLoadMore && <Waypoint key={page} onEnter={handleLoadMore} />}
|
||||
</Table>
|
||||
{hasMore && handleLoadMore && <Waypoint key={page} onEnter={handleLoadMore} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -40,13 +40,12 @@ const Sidebar: FC<TranslateProps> = ({ t }) => {
|
||||
|
||||
if ('nested' in collection) {
|
||||
return (
|
||||
<li key={`nested-${collectionName}`}>
|
||||
<NestedCollection
|
||||
key={`nested-${collectionName}`}
|
||||
collection={collection}
|
||||
filterTerm={filterTerm}
|
||||
data-testid={collectionName}
|
||||
/>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -6155,14 +6155,14 @@ babel-plugin-react-svg@^3.0.3:
|
||||
integrity sha512-Pst1RWjUIiV0Ykv1ODSeceCBsFOP2Y4dusjq7/XkjuzJdvS9CjpkPMUIoO4MLlvp5PiLCeMlsOC7faEUA0gm3Q==
|
||||
|
||||
"babel-plugin-styled-components@>= 1.12.0":
|
||||
version "2.0.7"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz#c81ef34b713f9da2b7d3f5550df0d1e19e798086"
|
||||
integrity sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-2.1.1.tgz#cd977cc0ff8410d5cbfdd142e42576e9c8794b87"
|
||||
integrity sha512-c8lJlszObVQPguHkI+akXv8+Jgb9Ccujx0EetL7oIvwU100LxO6XAGe45qry37wUL40a5U9f23SYrivro2XKhA==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.16.0"
|
||||
"@babel/helper-module-imports" "^7.16.0"
|
||||
babel-plugin-syntax-jsx "^6.18.0"
|
||||
lodash "^4.17.11"
|
||||
lodash "^4.17.21"
|
||||
picomatch "^2.3.0"
|
||||
|
||||
babel-plugin-syntax-export-extensions@^6.8.0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user