From c6c3caec398b0a4353054dd5d6685d1e38fef45b Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Sun, 20 Feb 2022 16:55:55 -0500 Subject: [PATCH] Restructure --- web/src/{ => app}/Subscription.js | 0 web/src/{ => app}/WsConnection.js | 0 web/src/{ => app}/utils.js | 0 web/src/{ => components}/AddDialog.js | 2 +- web/src/{ => components}/App.js | 5 ++--- web/src/{ => components}/theme.js | 0 web/src/index.js | 12 +++--------- 7 files changed, 6 insertions(+), 13 deletions(-) rename web/src/{ => app}/Subscription.js (100%) rename web/src/{ => app}/WsConnection.js (100%) rename web/src/{ => app}/utils.js (100%) rename web/src/{ => components}/AddDialog.js (97%) rename web/src/{ => components}/App.js (98%) rename web/src/{ => components}/theme.js (100%) diff --git a/web/src/Subscription.js b/web/src/app/Subscription.js similarity index 100% rename from web/src/Subscription.js rename to web/src/app/Subscription.js diff --git a/web/src/WsConnection.js b/web/src/app/WsConnection.js similarity index 100% rename from web/src/WsConnection.js rename to web/src/app/WsConnection.js diff --git a/web/src/utils.js b/web/src/app/utils.js similarity index 100% rename from web/src/utils.js rename to web/src/app/utils.js diff --git a/web/src/AddDialog.js b/web/src/components/AddDialog.js similarity index 97% rename from web/src/AddDialog.js rename to web/src/components/AddDialog.js index b8ebe611..837133ce 100644 --- a/web/src/AddDialog.js +++ b/web/src/components/AddDialog.js @@ -7,7 +7,7 @@ import DialogContent from '@mui/material/DialogContent'; import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle from '@mui/material/DialogTitle'; import {useState} from "react"; -import Subscription from "./Subscription"; +import Subscription from "../app/Subscription"; const defaultBaseUrl = "https://ntfy.sh" diff --git a/web/src/App.js b/web/src/components/App.js similarity index 98% rename from web/src/App.js rename to web/src/components/App.js index dfadb1c9..a60a16b8 100644 --- a/web/src/App.js +++ b/web/src/components/App.js @@ -3,8 +3,7 @@ import {useState} from 'react'; import Container from '@mui/material/Container'; import Typography from '@mui/material/Typography'; import Box from '@mui/material/Box'; -import Link from '@mui/material/Link'; -import WsConnection from './WsConnection'; +import WsConnection from '../app/WsConnection'; import {styled, ThemeProvider} from '@mui/material/styles'; import CssBaseline from '@mui/material/CssBaseline'; import MuiDrawer from '@mui/material/Drawer'; @@ -25,7 +24,7 @@ import ListItemButton from "@mui/material/ListItemButton"; import SettingsIcon from "@mui/icons-material/Settings"; import AddIcon from "@mui/icons-material/Add"; import Card from "@mui/material/Card"; -import {Button, CardActions, CardContent, Stack} from "@mui/material"; +import {CardContent, Stack} from "@mui/material"; import AddDialog from "./AddDialog"; import theme from "./theme"; diff --git a/web/src/theme.js b/web/src/components/theme.js similarity index 100% rename from web/src/theme.js rename to web/src/components/theme.js diff --git a/web/src/index.js b/web/src/index.js index 2e62b5fe..e439fe5c 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -1,14 +1,8 @@ import * as React from 'react'; import ReactDOM from 'react-dom'; -import CssBaseline from '@mui/material/CssBaseline'; -import { ThemeProvider } from '@mui/material/styles'; -import App from './App'; -import theme from './theme'; +import App from './components/App'; ReactDOM.render( - - - - , - document.querySelector('#root'), + , + document.querySelector('#root') );