diff --git a/web/source/settings-panel/admin/index.js b/web/source/settings-panel/admin/index.js
deleted file mode 100644
index 23e2f3b41..000000000
--- a/web/source/settings-panel/admin/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- GoToSocial
- Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-"use strict";
-
-const Promise = require("bluebird");
-const React = require("react");
-const { Route, Switch } = require("wouter");
-
-module.exports = function AdminPanel({oauth, routes}) {
- return (
-
- {routes}
-
- );
-};
\ No newline at end of file
diff --git a/web/source/settings-panel/index.js b/web/source/settings-panel/index.js
index e4b050055..56d3aa9ef 100644
--- a/web/source/settings-panel/index.js
+++ b/web/source/settings-panel/index.js
@@ -36,19 +36,13 @@ require("./style.css");
// TODO: nested categories?
const nav = {
"User": {
- Component: require("./user"),
- entries: {
- "Profile": require("./user/profile.js"),
- "Settings": require("./user/settings.js"),
- }
+ "Profile": require("./user/profile.js"),
+ "Settings": require("./user/settings.js"),
},
"Admin": {
- Component: require("./admin"),
- entries: {
- "Instance Settings": require("./admin/settings.js"),
- "Federation": require("./admin/federation.js"),
- "Customization": require("./admin/customization.js")
- }
+ "Instance Settings": require("./admin/settings.js"),
+ "Federation": require("./admin/federation.js"),
+ "Customization": require("./admin/customization.js")
}
};
diff --git a/web/source/settings-panel/lib/generate-views.js b/web/source/settings-panel/lib/generate-views.js
index 2e825c63a..cfbbb641b 100644
--- a/web/source/settings-panel/lib/generate-views.js
+++ b/web/source/settings-panel/lib/generate-views.js
@@ -19,7 +19,7 @@
"use strict";
const React = require("react");
-const { Link, Route, Redirect } = require("wouter");
+const { Link, Route, Switch, Redirect } = require("wouter");
const { ErrorBoundary } = require("react-error-boundary");
const ErrorFallback = require("../components/error");
@@ -33,7 +33,7 @@ module.exports = function generateViews(struct) {
const sidebar = [];
const panelRouter = [];
- Object.entries(struct).forEach(([name, {Component, entries}]) => {
+ Object.entries(struct).forEach(([name, entries]) => {
let base = `/settings/${urlSafe(name)}`;
let links = [];
@@ -50,9 +50,9 @@ module.exports = function generateViews(struct) {
routes.push((
- {}}>
+ { }}>
{/* FIXME: implement onReset */}
-
+
));
@@ -64,14 +64,16 @@ module.exports = function generateViews(struct) {
panelRouter.push(
-
+
);
let childrenPath = `${base}/:section`;
panelRouter.push(
-
+
+ {routes}
+
);
@@ -89,5 +91,5 @@ module.exports = function generateViews(struct) {
);
});
- return {sidebar, panelRouter};
+ return { sidebar, panelRouter };
};
\ No newline at end of file
diff --git a/web/source/settings-panel/user/index.js b/web/source/settings-panel/user/index.js
deleted file mode 100644
index 9c207365b..000000000
--- a/web/source/settings-panel/user/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- GoToSocial
- Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-"use strict";
-
-const Promise = require("bluebird");
-const React = require("react");
-const { Switch } = require("wouter");
-
-module.exports = function UserPanel({routes}) {
- return (
-
- {routes}
-
- );
-};
\ No newline at end of file