Skip to content

Commit 2463c3f

Browse files
committed
Cleanup and update some dependencies
1 parent 7f8ae7a commit 2463c3f

File tree

9 files changed

+80
-171
lines changed

9 files changed

+80
-171
lines changed

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@
55
"@fortawesome/free-solid-svg-icons": "^5.15.1",
66
"@fortawesome/react-fontawesome": "^0.1.11",
77
"@tailwindcss/forms": "^0.2.1",
8-
"axios": "^0.19.2",
8+
"axios": "^0.21.1",
99
"chart.js": "^2.8.0",
1010
"codemirror": "^5.57.0",
11-
"date-fns": "^2.14.0",
11+
"date-fns": "^2.16.1",
1212
"debounce": "^1.2.0",
1313
"deepmerge": "^4.2.2",
14-
"easy-peasy": "^3.3.1",
14+
"easy-peasy": "^4.0.1",
1515
"events": "^3.0.0",
16-
"formik": "^2.1.4",
16+
"formik": "^2.2.6",
1717
"i18next": "^19.0.0",
1818
"i18next-chained-backend": "^2.0.0",
1919
"i18next-localstorage-backend": "^3.0.0",
2020
"i18next-xhr-backend": "^3.2.2",
21-
"jquery": "^3.3.1",
2221
"path": "^0.12.7",
2322
"query-string": "^6.7.0",
2423
"react": "^16.13.1",
@@ -27,10 +26,8 @@
2726
"react-fast-compare": "^3.2.0",
2827
"react-ga": "^3.1.2",
2928
"react-google-recaptcha": "^2.0.1",
30-
"react-helmet": "^6.1.0",
3129
"react-hot-loader": "^4.12.21",
3230
"react-i18next": "^11.2.1",
33-
"react-redux": "^7.1.0",
3431
"react-router-dom": "^5.1.2",
3532
"react-transition-group": "^4.4.1",
3633
"reaptcha": "^1.7.2",
@@ -103,7 +100,6 @@
103100
"terser-webpack-plugin": "^3.0.6",
104101
"twin.macro": "^2.0.7",
105102
"typescript": "^3.9.6",
106-
"typescript-plugin-tw-template": "^2.0.1",
107103
"webpack": "^4.43.0",
108104
"webpack-assets-manifest": "^3.1.1",
109105
"webpack-bundle-analyzer": "^3.8.0",

resources/scripts/components/App.tsx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { store } from '@/state';
77
import DashboardRouter from '@/routers/DashboardRouter';
88
import ServerRouter from '@/routers/ServerRouter';
99
import AuthenticationRouter from '@/routers/AuthenticationRouter';
10-
import { Provider } from 'react-redux';
1110
import { SiteSettings } from '@/state/settings';
1211
import ProgressBar from '@/components/elements/ProgressBar';
1312
import NotFound from '@/components/screens/NotFound';
@@ -76,20 +75,18 @@ const App = () => {
7675
<GlobalStylesheet/>
7776
<TailwindGlobalStyles/>
7877
<StoreProvider store={store}>
79-
<Provider store={store}>
80-
<ProgressBar/>
81-
<div css={tw`mx-auto w-auto`}>
82-
<Router history={history}>
83-
{SiteConfiguration?.analytics && <Pageview/>}
84-
<Switch>
85-
<Route path="/server/:id" component={ServerRouter}/>
86-
<Route path="/auth" component={AuthenticationRouter}/>
87-
<Route path="/" component={DashboardRouter}/>
88-
<Route path={'*'} component={NotFound}/>
89-
</Switch>
90-
</Router>
91-
</div>
92-
</Provider>
78+
<ProgressBar/>
79+
<div css={tw`mx-auto w-auto`}>
80+
<Router history={history}>
81+
{SiteConfiguration?.analytics && <Pageview/>}
82+
<Switch>
83+
<Route path="/server/:id" component={ServerRouter}/>
84+
<Route path="/auth" component={AuthenticationRouter}/>
85+
<Route path="/" component={DashboardRouter}/>
86+
<Route path={'*'} component={NotFound}/>
87+
</Switch>
88+
</Router>
89+
</div>
9390
</StoreProvider>
9491
</>
9592
);

resources/scripts/components/elements/PageContentBlock.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import React from 'react';
1+
import React, { useEffect } from 'react';
22
import ContentContainer from '@/components/elements/ContentContainer';
33
import { CSSTransition } from 'react-transition-group';
44
import tw from 'twin.macro';
55
import FlashMessageRender from '@/components/FlashMessageRender';
6-
import { Helmet } from 'react-helmet';
76

87
export interface PageContentBlockProps {
98
title?: string;
@@ -12,14 +11,15 @@ export interface PageContentBlockProps {
1211
}
1312

1413
const PageContentBlock: React.FC<PageContentBlockProps> = ({ title, showFlashKey, className, children }) => {
14+
useEffect(() => {
15+
if (title) {
16+
document.title = title;
17+
}
18+
}, [ title ]);
19+
1520
return (
1621
<CSSTransition timeout={150} classNames={'fade'} appear in>
1722
<>
18-
{title &&
19-
<Helmet>
20-
<title>{title}</title>
21-
</Helmet>
22-
}
2323
<ContentContainer css={tw`my-4 sm:my-10`} className={className}>
2424
{showFlashKey &&
2525
<FlashMessageRender byKey={showFlashKey} css={tw`mb-4`}/>

resources/scripts/components/server/ServerConsole.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ const ChunkedStatGraphs = lazy(() => import(/* webpackChunkName: "graphs" */'@/c
1818
const ServerConsole = () => {
1919
const isInstalling = ServerContext.useStoreState(state => state.server.data!.isInstalling);
2020
const isTransferring = ServerContext.useStoreState(state => state.server.data!.isTransferring);
21-
// @ts-ignore
22-
const eggFeatures: string[] = ServerContext.useStoreState(state => state.server.data!.eggFeatures, isEqual);
21+
const eggFeatures = ServerContext.useStoreState(state => state.server.data!.eggFeatures, isEqual);
2322

2423
return (
2524
<ServerContentBlock title={'Console'} css={tw`flex flex-wrap`}>

resources/scripts/components/server/network/NetworkContainer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ const NetworkContainer = () => {
1717
const [ loading, setLoading ] = useState(false);
1818
const uuid = ServerContext.useStoreState(state => state.server.data!.uuid);
1919
const allocationLimit = ServerContext.useStoreState(state => state.server.data!.featureLimits.allocations);
20-
// @ts-ignore
21-
const allocations: Allocation[] = ServerContext.useStoreState(state => state.server.data!.allocations, isEqual);
20+
const allocations = ServerContext.useStoreState(state => state.server.data!.allocations, isEqual);
2221
const setServerFromState = ServerContext.useStoreActions(actions => actions.server.setServerFromState);
2322

2423
const { clearFlashes, clearAndAddHttpError } = useFlash();

resources/scripts/components/server/schedules/ScheduleEditContainer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ export default ({ match, history, location: { state } }: RouteComponentProps<Par
5353
const [ isLoading, setIsLoading ] = useState(true);
5454
const [ showEditModal, setShowEditModal ] = useState(false);
5555

56-
// @ts-ignore
57-
const schedule: Schedule | undefined = ServerContext.useStoreState(st => st.schedules.data.find(s => s.id === state.schedule?.id), isEqual);
56+
const schedule = ServerContext.useStoreState(st => st.schedules.data.find(s => s.id === state.schedule?.id), isEqual);
5857
const appendSchedule = ServerContext.useStoreActions(actions => actions.schedules.appendSchedule);
5958

6059
useEffect(() => {

resources/scripts/components/server/settings/SettingsContainer.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ export default () => {
1919
const id = ServerContext.useStoreState(state => state.server.data!.id);
2020
const uuid = ServerContext.useStoreState(state => state.server.data!.uuid);
2121
const node = ServerContext.useStoreState(state => state.server.data!.node);
22-
const sftp = ServerContext.useStoreState(
23-
state => state.server.data!.sftpDetails,
24-
// @ts-ignore
25-
isEqual,
26-
);
22+
const sftp = ServerContext.useStoreState(state => state.server.data!.sftpDetails, isEqual);
2723

2824
return (
2925
<ServerContentBlock title={'Settings'}>

resources/scripts/components/server/startup/StartupContainer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const StartupContainer = () => {
2525
variables: server.data!.variables,
2626
invocation: server.data!.invocation,
2727
dockerImage: server.data!.dockerImage,
28-
// @ts-ignore
2928
}), isEqual);
3029

3130
const { data, error, isValidating, mutate } = getServerStartup(uuid, {

0 commit comments

Comments
 (0)