diff --git a/src/pages/404.js b/src/pages/404.js deleted file mode 100644 index 053ae0e..0000000 --- a/src/pages/404.js +++ /dev/null @@ -1,54 +0,0 @@ -import * as React from "react" -import { Link } from "gatsby" - -// styles -const pageStyles = { - color: "#232129", - padding: "96px", - fontFamily: "-apple-system, Roboto, sans-serif, serif", -} -const headingStyles = { - marginTop: 0, - marginBottom: 64, - maxWidth: 320, -} - -const paragraphStyles = { - marginBottom: 48, -} -const codeStyles = { - color: "#8A6534", - padding: 4, - backgroundColor: "#FFF4DB", - fontSize: "1.25rem", - borderRadius: 4, -} - -// markup -const NotFoundPage = () => { - return ( -
- Not found -

Page not found

-

- Sorry{" "} - - 😔 - {" "} - we couldn’t find what you were looking for. -
- {process.env.NODE_ENV === "development" ? ( - <> -
- Try creating a page in src/pages/. -
- - ) : null} -
- Go home. -

-
- ) -} - -export default NotFoundPage diff --git a/src/pages/func_group/root.js b/src/pages/func_group/root.js new file mode 100644 index 0000000..b4bec8e --- /dev/null +++ b/src/pages/func_group/root.js @@ -0,0 +1,10 @@ +import * as React from 'react' + +const Root = () => { + return ( + <> + + ) +} + +export default Root \ No newline at end of file diff --git a/src/pages/index.js b/src/pages/index.js index 32b8fda..03ae8e1 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,150 +1,20 @@ -import * as React from "react" +import React from 'react'; +// import ReactDOM from 'react-dom'; -// styles -const pageStyles = { - color: "#232129", - padding: "96px", - fontFamily: "-apple-system, Roboto, sans-serif, serif", -} -const headingStyles = { - marginTop: 0, - marginBottom: 64, - maxWidth: 320, -} -const headingAccentStyles = { - color: "#663399", -} -const paragraphStyles = { - marginBottom: 48, -} -const codeStyles = { - color: "#8A6534", - padding: 4, - backgroundColor: "#FFF4DB", - fontSize: "1.25rem", - borderRadius: 4, -} -const listStyles = { - marginBottom: 96, - paddingLeft: 0, -} -const listItemStyles = { - fontWeight: "300", - fontSize: "24px", - maxWidth: "560px", -} +import { Provider } from 'react-redux'; +import { store } from '../redux/store'; -const linkStyle = { - color: "#8954A8", - fontWeight: "bold", - fontSize: "16px", - verticalAlign: "5%", -} +import Root from './func_group/root'; -const docLinkStyle = { - ...linkStyle, - listStyleType: "none", - marginBottom: 24, -} +// if you have problem with watchers - use it: +// echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p -const descriptionStyle = { - color: "#232129", - fontSize: "14px", -} - -const docLink = { - text: "Documentation", - url: "https://www.gatsbyjs.com/docs/", - color: "#8954A8", -} -// data -const links = [ - { - text: "Tutorial", - url: "https://www.gatsbyjs.com/docs/tutorial/", - description: - "A great place to get started if you're new to web development. Designed to guide you through setting up your first Gatsby site.", - color: "#E95800", - }, - { - text: "How to Guides", - url: "https://www.gatsbyjs.com/docs/how-to/", - description: - "Practical step-by-step guides to help you achieve a specific goal. Most useful when you're trying to get something done.", - color: "#1099A8", - }, - { - text: "Reference Guides", - url: "https://www.gatsbyjs.com/docs/reference/", - description: - "Nitty-gritty technical descriptions of how Gatsby works. Most useful when you need detailed information about Gatsby's APIs.", - color: "#BC027F", - }, - { - text: "Conceptual Guides", - url: "https://www.gatsbyjs.com/docs/conceptual/", - description: - "Big-picture explanations of higher-level Gatsby concepts. Most useful for building understanding of a particular topic.", - color: "#0D96F2", - }, - { - text: "Plugin Library", - url: "https://www.gatsbyjs.com/plugins", - description: - "Add functionality and customize your Gatsby site or app with thousands of plugins built by our amazing developer community.", - color: "#000000", - }, -] - -// markup -const IndexPage = () => { +const Index = () => { return ( -
- Home Page -

- Congratulations -
- — you just made a Gatsby site! - - 🎉🎉🎉 - -

-

- Edit src/pages/index.js to see this page - update in real-time.{" "} - - 😎 - -

- - Gatsby G Logo -
+ + + ) } -export default IndexPage +export default Index \ No newline at end of file diff --git a/src/redux/asyncThunks/abstractAddress.js b/src/redux/asyncThunks/abstracts/abstractAddress.js similarity index 100% rename from src/redux/asyncThunks/abstractAddress.js rename to src/redux/asyncThunks/abstracts/abstractAddress.js diff --git a/src/redux/asyncThunks/abstractService.js b/src/redux/asyncThunks/abstracts/abstractService.js similarity index 100% rename from src/redux/asyncThunks/abstractService.js rename to src/redux/asyncThunks/abstracts/abstractService.js diff --git a/src/redux/asyncThunks/modelCrudAsyncThunk.js b/src/redux/asyncThunks/modelCrudAsyncThunk.js index 8bbfe7c..c3c13a4 100644 --- a/src/redux/asyncThunks/modelCrudAsyncThunk.js +++ b/src/redux/asyncThunks/modelCrudAsyncThunk.js @@ -1,5 +1,5 @@ import { createAsyncThunk } from '@reduxjs/toolkit' -import abstractService from './abstractService' +import abstractService from './abstracts/abstractService' let endpoint = '/model/' @@ -26,7 +26,7 @@ const fetchGetOneModelAndDownload = createAsyncThunk( thunkAPI ) => { return await abstractService._getOne( - trueEndpoint, + endpoint, body.id, body.token ) @@ -49,7 +49,7 @@ const fetchUploadModel = createAsyncThunk( formData.append("blend", body.file) body.file = formData return await abstractService._post( - trueEndpoint, + endpoint, body, body.token ) diff --git a/src/redux/asyncThunks/renderCrudAsyncThunk.js b/src/redux/asyncThunks/renderCrudAsyncThunk.js index afe56f2..ded2022 100644 --- a/src/redux/asyncThunks/renderCrudAsyncThunk.js +++ b/src/redux/asyncThunks/renderCrudAsyncThunk.js @@ -1,5 +1,5 @@ import { createAsyncThunk } from '@reduxjs/toolkit' -import abstractService from './abstractService' +import abstractService from './abstracts/abstractService' let endpoint = '/render/' @@ -26,7 +26,7 @@ const fetchGetOneRenderAndDownload = createAsyncThunk( thunkAPI ) => { return await abstractService._getOne( - trueEndpoint, + endpoint, body.id, body.token ) diff --git a/src/redux/asyncThunks/renderWebsocketAsyncThunk.js b/src/redux/asyncThunks/renderWebsocketAsyncThunk.js index e9649a6..32c6bdb 100644 --- a/src/redux/asyncThunks/renderWebsocketAsyncThunk.js +++ b/src/redux/asyncThunks/renderWebsocketAsyncThunk.js @@ -1,5 +1,5 @@ import { createAsyncThunk } from '@reduxjs/toolkit' -import GeneralAddress from './abstractAddress' +import GeneralAddress from './abstracts/abstractAddress' let endpoint_single_image = '/render/single/image/' let endpoint_single_set = '/render/single/set/' @@ -109,5 +109,5 @@ const fetchDisconnect = createAsyncThunk( export default { fetchConnect, fetchSaveMessage, - fetchDisconnect, + fetchDisconnect } \ No newline at end of file diff --git a/src/redux/asyncThunks/userAuthAsyncThunk.js b/src/redux/asyncThunks/userAuthAsyncThunk.js index 9c8999c..85d3d00 100644 --- a/src/redux/asyncThunks/userAuthAsyncThunk.js +++ b/src/redux/asyncThunks/userAuthAsyncThunk.js @@ -1,5 +1,5 @@ import { createAsyncThunk } from '@reduxjs/toolkit' -import abstractService from './abstractService' +import abstractService from './abstracts/abstractService' let endpoint = '/user/auth' diff --git a/src/redux/asyncThunks/userCrudAsyncThunk.js b/src/redux/asyncThunks/userCrudAsyncThunk.js index c83677e..c68e013 100644 --- a/src/redux/asyncThunks/userCrudAsyncThunk.js +++ b/src/redux/asyncThunks/userCrudAsyncThunk.js @@ -1,5 +1,5 @@ import { createAsyncThunk } from '@reduxjs/toolkit' -import abstractService from './abstractService' +import abstractService from './abstracts/abstractService' let endpoint = '/user/' diff --git a/src/redux/slices/renderWebsocketSlice.js b/src/redux/slices/renderWebsocketSlice.js index 0ffd28e..eed01f0 100644 --- a/src/redux/slices/renderWebsocketSlice.js +++ b/src/redux/slices/renderWebsocketSlice.js @@ -27,10 +27,10 @@ const renderWebsocketSlice = createSlice( ] }, [renderWebsocketAsyncThunk.fetchDisconnect.fulfilled.type]: (state, action) => { - state.web_socket = action.web_socket, - state.address = '', - state.room_uuid = '', - state.messages = [], + state.web_socket = action.web_socket + state.address = '' + state.room_uuid = '' + state.messages = [] state.connected = false } }