mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Init empty states
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
8160b84881
commit
6abe749058
@ -16,7 +16,6 @@
|
||||
"@strapi/plugin-documentation": "3.6.8",
|
||||
"@strapi/plugin-graphql": "3.6.8",
|
||||
"@strapi/plugin-i18n": "3.6.8",
|
||||
"@strapi/plugin-users-permissions": "3.6.8",
|
||||
"@strapi/provider-email-mailgun": "3.6.8",
|
||||
"@strapi/provider-upload-aws-s3": "3.6.8",
|
||||
"@strapi/provider-upload-cloudinary": "3.6.8",
|
||||
|
||||
@ -126,8 +126,6 @@ function ListView({
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('iii');
|
||||
|
||||
console.error(err);
|
||||
toggleNotification({
|
||||
type: 'warning',
|
||||
@ -355,6 +353,9 @@ export function mapDispatchToProps(dispatch) {
|
||||
dispatch
|
||||
);
|
||||
}
|
||||
const withConnect = connect(mapStateToProps, mapDispatchToProps);
|
||||
const withConnect = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
);
|
||||
|
||||
export default compose(withConnect)(memo(ListView, isEqual));
|
||||
|
||||
@ -400,6 +400,10 @@ const DataManagerProvider = ({
|
||||
const shouldRedirect = useMemo(() => {
|
||||
const dataSet = isInContentTypeView ? contentTypes : components;
|
||||
|
||||
if (currentUid === 'create-content-type') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !Object.keys(dataSet).includes(currentUid) && !isLoading;
|
||||
}, [components, contentTypes, currentUid, isInContentTypeView, isLoading]);
|
||||
|
||||
@ -408,7 +412,7 @@ const DataManagerProvider = ({
|
||||
.filter(uid => get(contentTypes, [uid, 'schema', 'visible'], true))
|
||||
.sort();
|
||||
|
||||
return get(allowedEndpoints, '0', '');
|
||||
return get(allowedEndpoints, '0', 'create-content-type');
|
||||
}, [contentTypes]);
|
||||
|
||||
if (shouldRedirect) {
|
||||
|
||||
@ -26,6 +26,10 @@ const App = () => {
|
||||
<Layout sideNav={<ContentTypeBuilderNav />}>
|
||||
<Suspense fallback={<LoadingIndicatorPage />}>
|
||||
<Switch>
|
||||
<Route
|
||||
path={`/plugins/${pluginId}/content-types/create-content-type`}
|
||||
component={ListView}
|
||||
/>
|
||||
<Route path={`/plugins/${pluginId}/content-types/:uid`} component={ListView} />
|
||||
<Route
|
||||
path={`/plugins/${pluginId}/component-categories/:categoryUid`}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user