Remove unnecessary files

This commit is contained in:
Axel committed 2021-11-29 18:33:28 -03:00
1 parent 1bbe09a7d0
commit 2935e989f7
53 files changed
+66 -865

No files matched your search

+7 -4
View File
@@ -72,10 +72,13 @@ exports.newDesktopApp = function newDesktopApp() {
/* TODO refactor this into something better */
let react = require('./scripts/start');
react.start(JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webPort);
/* thisObject.httpInterface = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface()
thisObject.httpInterface.initialize()*/
let preloader = require('./UI/WebAppPreLoader');
/* let react = require('./scripts/start');
react.start(JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webPort);*/
/* thisObject.httpInterface = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface()
thisObject.httpInterface.initialize()*/
console.log('Desktop Client Http Interface ................................................ Listening at port ' + JSON.parse(DK.desktopApp.p2pNetworkClient.node.config).webPort)
}
}
+3 -6
View File
@@ -1,6 +1,6 @@
/* Root object*/
/* Root objects*/
let UI = {
exports.UI = {
projects: {},
schemas: { projectSchema: undefined },
environment: undefined,
@@ -8,10 +8,7 @@ let UI = {
webApp: undefined
}
let SA = { projects: {} }
/*
We will use this to load functions originally intended for Nodejs
*/
let exports = {}
exports.SA = { projects: {} }
+4 -13
View File
@@ -1,12 +1,3 @@
const reactReqs = {
a: REQUIREJS([], () => {}),
React: require('react'),
ReactDOM: require('react-dom'),
ReactBase: require("../components/ReactBase")
}
function newWebApp() {
/*
In it's current state of development, the Web App only has one module.
@@ -30,10 +21,10 @@ function newWebApp() {
setupRootObject(UI, 'UI')
setupRootObject(SA, 'SA')
await UI.projects.socialTrading.modules.webSocketsWebAppClient.initialize()
loadReactDom();
// loadWUserProfileTimeline()
// loadWhoToFollow()
// setupEventHandlers()
// loadReactDom();
loadWUserProfileTimeline()
loadWhoToFollow()
setupEventHandlers()
} catch (err) {
console.log('[ERROR] initialize -> err.stack = ' + err.stack)
}
+11 -19
View File
@@ -1,29 +1,21 @@
loadSuperalgos();
function loadSuperalgos() {
let browser = checkBrowserVersion()
if ((browser.name !== "Chrome" && browser.name !== "Safari") || (browser.name === "Chrome" && parseInt(browser.version) < 85) || (browser.name === "Safari" && parseInt(browser.version) < 13)) {
alert("Superalgos is officially supported on Google Chrome 85 or Safari 13.1 and above. Your browser version has been detected as potentially beneath this. If you continue you may experience some functionaility issues.\n\nDetected Browser: " + browser.name + "\nVersion: " + browser.version)
}
/*
let browser = checkBrowserVersion()
if ((browser.name !== "Chrome" && browser.name !== "Safari") || (browser.name === "Chrome" && parseInt(browser.version) < 85) || (browser.name === "Safari" && parseInt(browser.version) < 13)) {
alert("Superalgos is officially supported on Google Chrome 85 or Safari 13.1 and above. Your browser version has been detected as potentially beneath this. If you continue you may experience some functionality issues.\n\nDetected Browser: " + browser.name + "\nVersion: " + browser.version)
}
*/
loadGlobals()
function loadGlobals() {
let path = "Globals.js"
REQUIREJS([path], onRequired)
function onRequired(pModule) {
setupEnvironment()
}
}
function setupEnvironment() {
httpRequest(undefined, 'Environment', onResponse)
function onResponse(err, file) {
UI.environment = JSON.parse(file)
setupClientNode()
}
let globals = require('./Globals');
globals.UI.environment = require('../../Environment')
setupClientNode()
}
function setupClientNode() {
-42
View File
@@ -1,42 +0,0 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Superalgos Desktop</title>
<meta name="description" content="Free and Open Source Crypto Social Trading">
<link rel="stylesheet" href="main.css" type="text/css" charset="utf-8"/>
<link rel="shortcut icon" type="image/png/ico" href="Images/favicon.ico"/>
<script type="text/javascript" src="Require.js"></script>
<script type="text/javascript" src="WebAppPreLoader.js"></script>
<script type="text/javascript">
function loadApp() {
// Prevent click-jacking
try {
if (window == window.top || window.chrome && chrome.app && chrome.app.window) {
document.documentElement.style.display = 'block'
} else {
top.location = self.location
}
} catch (e) {
console.error('CJ protection', e)
}
try {
loadSuperalgos()
} catch (err) {
console.log("[ERROR] UI can not be started. Please check that WebServer is running.", err);
}
}
function onResize() {
}
</script>
</head>
<body id="body" onload="loadApp()" onresize="onResize()" class="body">
<div id="root"></div>
</body>
</html>
-16
View File
@@ -1,16 +0,0 @@
import React from 'react';
import {Provider} from "react-redux";
import reducers from "../store";
import Root from "./Root";
const ReactBase = () => {
return (
<React.StrictMode>
<Provider store={reducers}>
<Root/>
</Provider>
</React.StrictMode>
);
};
export default ReactBase;
-31
View File
@@ -1,31 +0,0 @@
import React from 'react';
import {BrowserRouter, Route, Routes} from 'react-router-dom';
import App from './home/App';
import UserProfile from "./userProfile/UserProfile";
import NotFound from "./notFound/NotFound";
import Feed from "./feed/Feed";
import PostPlaceholder from "./postPlaceholder/PostPlaceholder";
const Root = () => {
return (
<BrowserRouter>
<Routes>
<Route path='/' element={<App/>}>
<Route path='' element={<Feed/>}/>
<Route path='Profile' element={<UserProfile/>}>
{/*<Route path=':profileId' element={<UserProfile/>}/>*/}
</Route>
<Route path='Post' element={<PostPlaceholder/>}/>
</Route>
<Route
path="*"
element={
<NotFound/>
}
/>
</Routes>
</BrowserRouter>)
}
export default Root;
-17
View File
@@ -1,17 +0,0 @@
.followButton {
margin: 0.5rem;
width: 3rem;
max-height: 1.5rem;
}
.userCard {
display: flex;
flex-direction: row;
align-items: center;
padding: 0.25rem 1rem;
}
.avatar {
height: 3rem;
width: 3rem;
}
-30
View File
@@ -1,30 +0,0 @@
import "./UserCard.css"
import React, {useEffect} from 'react';
import {Button, Card, CardContent, CardMedia, Typography} from "@mui/material";
import pic from "./../../images/superalgos.png"
const UserCard = ({name, id,followCallback}) => {
useEffect(() => {
console.log(`created user with id ${id}`)
}, [id]);
return (
<Card className="userCard" variant="outlined">
<CardMedia className="avatar"
component="img"
image={pic}
alt="PP"
/>
<CardContent>
<Typography variant="body2">{name}</Typography>
</CardContent>
<Button className="followButton" size="small" disableElevation variant="outlined" onClick={followCallback}>
Follow
</Button>
</Card>
);
};
export default UserCard;
@@ -1,4 +0,0 @@
.showMore {
width: 100%;
text-align: center;
}
@@ -1,23 +0,0 @@
import './UsersSidebar.css';
import {Stack} from "@mui/material";
import SearchBox from "../searchBox/SearchBox";
import SuggestedUsers from "../suggestedUsers/SuggestedUsers";
const UsersSidebar = () => {
const showMoreCallback = () => console.log("clicked show more");
return (
<Stack direction="column"
justifyContent="flex-start"
alignItems="center"
spacing={2}
sx={{minWidth: "max-content"}}>
<SearchBox/>
<SuggestedUsers showMoreCallback={showMoreCallback}/>
</Stack>
);
}
export default UsersSidebar;
-11
View File
@@ -1,11 +0,0 @@
.feed {
width: 40rem;
height: 95vh;
overflow: auto;
-ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.feed::-webkit-scrollbar { /* Hide scrollbar for Chrome, Safari and Opera */
display: none;
}
-14
View File
@@ -1,14 +0,0 @@
import './Feed.css';
import PostPlaceholder from "../postPlaceholder/PostPlaceholder";
import PostsFeed from "../postsFeed/PostsFeed";
const Feed = () => {
return (
<div className="feed">
<PostPlaceholder/>
<PostsFeed/>
</div>
);
}
export default Feed;
-7
View File
@@ -1,7 +0,0 @@
.app {
height: 100%;
}
.middleSection{
width: 40rem;
}
-23
View File
@@ -1,23 +0,0 @@
import './App.css';
import Sidebar from "../sidebar/Sidebar";
import UsersSidebar from "../UsersSidebar/UsersSidebar";
import {Stack} from "@mui/material";
import {Outlet} from "react-router-dom";
function App() {
return (
<div className="app">
<Stack className="app"
direction="row"
justifyContent="space-around">
<Sidebar/>
<Outlet className="middleSection"/>
<UsersSidebar/>
</Stack>
</div>
);
}
export default App;
-10
View File
@@ -1,10 +0,0 @@
/*noinspection CssInvalidPropertyValue*/
.logo {
display: inline-flex;
align-items: center;
height: 3rem;
width: 100%;
}
.icon {
margin: 0 0.5rem;
}
-17
View File
@@ -1,17 +0,0 @@
import './Logo.css';
import React from 'react';
import {Avatar, Stack} from "@mui/material";
import pic from "./../../images/superalgos.png"
const Logo = props => {
/* TODO add on click redirect to / */
return (
<Stack direction="row" className="logo">
<Avatar className="icon" alt="SuperAlgos" src={pic}/>
<div>SuperAlgos</div>
</Stack>
);
};
export default Logo;
-10
View File
@@ -1,10 +0,0 @@
import React, {useEffect} from 'react';
import {useNavigate} from "react-router-dom";
const NotFound = () => {
let navigate = useNavigate();
useEffect(() => navigate("/"), [navigate])
return null;
};
export default NotFound;
-32
View File
@@ -1,32 +0,0 @@
.post {
min-width: 5rem; /* todo needs to set a minimum width, but overriding from parent*/
max-width: 100%;
min-height: 5rem; /* todo needs tbd. needed actually? */
max-height: 100%; /* todo need to be 8rem, but is collapsing without scroll. need fix*/
padding: 0.5rem;
}
.postAvatarContainer {
display: flex;
justify-content: center;
align-items: center;
width: 3rem;
height: 3rem;
}
.postBody {
height: 12.5rem;
padding-left: 2.8rem;
}
.postUserName {
padding: 0.75rem;
justify-content: center;
align-items: center;
}
.postFooter {
justify-content: space-evenly;
padding: 0.15rem;
width: 100%;
display: flex;
}
-62
View File
@@ -1,62 +0,0 @@
import "./Post.css"
import React from 'react';
import {Avatar, Card, IconButton, Stack} from "@mui/material";
import {Autorenew, ThumbDown, ThumbUp} from "@mui/icons-material";
import pic from "./../../images/superalgos.png"
const Post = () => {
const userName = "User Name",
postBody = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
function onButtonClick() {
console.log("Clicked the button");
}
return (
<Card className="post">
<Stack direction="row">
<Stack className="postAvatarContainer">
<Avatar src={pic}/>
</Stack>
<Stack className="postUserName">
{/*use props or local variables*/}
{userName}
</Stack>
</Stack>
<Stack className="postBody">
{/*use props or local variables*/}
{postBody}
</Stack>
<Stack className="postFooter" direction="row">
{/* footer (buttons: like/dislike, repost) */}
<IconButton
onClick={() => { /* TODO remove unnecessary arrow function*/
onButtonClick()
}}
>
<ThumbUp/>
</IconButton>
<IconButton
onClick={() => {/* TODO remove unnecessary arrow function*/
onButtonClick()
}}
>
<ThumbDown/>
</IconButton>
<IconButton
onClick={() => {/* TODO remove unnecessary arrow function*/
onButtonClick()
}}
>
<Autorenew/>
</IconButton>
</Stack>
</Card>
);
};
export default Post;
@@ -1,47 +0,0 @@
.postPlaceholder {
width: 40rem;
padding: 0.5rem;
}
.postPlaceholderContainer {
min-width: 100%;
max-width: 100%;
}
.postPlaceholderInputBoxContainer {
}
.postPlaceholderAvatar {
display: flex;
justify-content: center;
align-items: center;
width: 3rem;
height: 3rem;
}
.postPlaceholderTextField {
width: 90%;
border: 5px;
}
.postPlaceholderInputBox {
width: auto;
padding: 0.5rem;
}
.postFeedAccountCircle {
}
.postPlaceholderButtonStyle {
padding: 0.75rem;
display: flex;
width: auto;
justify-content: flex-end;
}
.postPlaceholderButton {
height: 1.5rem;
width: 5rem;
}
@@ -1,54 +0,0 @@
import "./PostPlaceholder.css"
import React from 'react';
import {Avatar, Button, Card, Stack, TextField, Typography} from "@mui/material";
import pic from "./../../images/superalgos.png"
const PostPlaceholder = () => {
function onButtonClick() {
console.log("Clicked Post button");
}
return (
<div className="postPlaceholder">
<h4>Posts</h4>
<div className="postPlaceholderContainer">
<Card>
<Stack
className="postPlaceholderInputBox"
direction="row"
justifyContent="flex-start"
alignItems="center"
spacing={1}
justify="flex-end">
<Stack className="postPlaceholderAvatar">
<Avatar src={pic}/>
</Stack>
<Stack className="postPlaceholderTextField">
<Typography gutterBottom variant="subtitle1" component="div">
<TextField
id="outlined-multiline-flexible"
label="what's happening?"
fullWidth
multiline
maxRows={6}
/>
</Typography>
</Stack>
</Stack>
<Stack className="postPlaceholderButtonStyle" direction="row">
<Button
onClick={() => { /* TODO remove unnecessary arrow function call*/
onButtonClick()
}}
className="postPlaceholderButton" variant="outlined">
Post
</Button>
</Stack>
</Card>
</div>
</div>
);
};
export default PostPlaceholder;
@@ -1,4 +0,0 @@
.postFeedContainer {
padding: 0.5rem ;
width: 100%;
}
-26
View File
@@ -1,26 +0,0 @@
import './PostsFeed.css';
import React from 'react';
import {Stack} from "@mui/material";
import Post from "../post/Post";
const PostsFeed = () => {
const postFeed = [1, 2, 3, 4, 5];
const posts = postFeed.map(
value => {
return <Post key={value} id={value} name={`user${value}`}/>
}
)
return (
<div className="postFeedContainer"> {/* todo margin appearing to the right of the div */}
<Stack direction="column"
spacing={2}>
{posts}
</Stack>
</div>
);
};
export default PostsFeed;
@@ -1,3 +0,0 @@
.searchIcon {
margin: 1rem 0.5rem;
}
-16
View File
@@ -1,16 +0,0 @@
import React from 'react';
import {Box, TextField} from "@mui/material";
import {Search} from "@mui/icons-material";
const SearchBox = () => {
return (
<div>
<Box sx={{display: 'flex', alignItems: 'flex-end'}}>
<Search className="searchIcon"/>
<TextField id="users-search" label="Search" variant="standard" type="search"/>
</Box>
</div>
);
};
export default SearchBox;
@@ -1,16 +0,0 @@
import React from 'react';
import {Link} from "@mui/material";
const ShowMoreUsers = ({showMoreCallback}) => {
return (
<Link
component="button"
variant="body2"
onClick={showMoreCallback}>
Show more
</Link>
);
};
export default ShowMoreUsers;
-3
View File
@@ -1,3 +0,0 @@
.sidebar{
height: 100%;
}
-42
View File
@@ -1,42 +0,0 @@
import './Sidebar.css';
import {Divider, Stack} from "@mui/material";
import SidebarItem from "../sidebarItem/SidebarItem";
import Logo from "../logo/Logo";
import HomeIcon from '@mui/icons-material/Home';
import PostAddIcon from '@mui/icons-material/PostAdd';
import PersonIcon from '@mui/icons-material/Person';
const Sidebar = props => {
const menuOptions = [{name: "Home", icon: HomeIcon},
{name: "Profile", icon: PersonIcon},
{name: "Post", icon: PostAddIcon}
/*, "Explore", "Notifications", "Messages", "Bookmarks", "Lists", "More"*/]
const menuItems = menuOptions.map(option => {
return <SidebarItem key={option.name} Icon={option.icon} value={option.name}/>
})
return (
<div className="sidebar">
<Stack direction="column"
justifyContent="flex-start"
alignItems="center"
spacing={5}
sx={{minWidth: "max-content"}}>
<Logo/>
<Stack
direction="column"
justifyContent="space-between"
alignItems="center"
spacing={2}
divider={<Divider orientation="horizontal" flexItem/>}>
{menuItems}
</Stack>
</Stack>
</div>
);
}
export default Sidebar;
@@ -1,21 +0,0 @@
.sidebarItem {
/*TODO add on hover*/
/*TODO add breakpoints*/
width: 15vw;
}
.sidebarText {
/*TODO hide when too small*/
width: auto;
text-align: center;
}
.sidebarIcon {
width: auto;
padding: 0 1rem;
}
@@ -1,22 +0,0 @@
import './SidebarItem.css';
import {Stack} from "@mui/material";
import {useNavigate} from "react-router-dom";
const SidebarItem = ({value, Icon}) => {
let navigate = useNavigate();
const handleClick = () => {
navigate(`/${value}`)
}
return (
<div className="sidebarItem" onClick={handleClick}>
<Stack direction="row">
<Icon className="sidebarIcon"/>
<div className="sidebarText"> {value} </div>
</Stack>
</div>
);
}
export default SidebarItem;
Whitespace-only changes.
@@ -1,32 +0,0 @@
import "./SuggestedUsers.css"
import React, {useEffect} from 'react';
import UserCard from "../User/UserCard";
import ShowMoreUsers from "../showMoreUsers/ShowMoreUsers";
import {Stack} from "@mui/material";
const SuggestedUsers = ({showMoreCallback}) => {
const usersIds = [1, 2, 3, 4, 5];
const users = usersIds.map(value => {
let callBack = () => console.log(`Clicked follow on user${value}`);
return <UserCard key={value} id={value} name={`user${value}`} followCallback={callBack}/>
})
useEffect(() => {
console.log("SuggestedUsersConstructor called")
}, []);
return (
<Stack direction="column"
justifyContent="flex-start"
alignItems="center"
spacing={1}>
{users}
<ShowMoreUsers showMoreCallback={showMoreCallback}/>
</Stack>
);
};
export default SuggestedUsers;
@@ -1,41 +0,0 @@
.userSection {
margin-top: 50px;
}
.banner {
height: 10rem;
}
.profileAvatar {
height: 7rem !important;
width: 7rem !important;
border-radius: 50%;
}
.profilePicBG {
display: flex;
align-items: center;
justify-content: center;
background: none no-repeat scroll 0 0 #fff;
position: relative;
height: 8rem !important;
width: 8rem !important;
border-radius: 50%;
}
.profileCard {
margin-top: -50px;
display: flex;
flex-direction: row;
height: 8rem;
}
.profileSection {
width: 100%;
overflow: initial !important; /* TODO check this is needed */
height: 15rem;
}
.middleSection {
width: 40rem;
}
@@ -1,28 +0,0 @@
import "./UserProfile.css"
import React from 'react';
import UserProfileHeader from "../userProfileHeader/UserProfileHeader";
import {Stack} from "@mui/material";
import PostsFeed from "../postsFeed/PostsFeed";
const UserProfile = () => {
/*TODO finish this shit*/
let actualUser = 'Loui Molina';
return (
<Stack direction="column"
justifyContent="flex-start"
alignItems="center"
spacing={1}
className="middleSection">
<UserProfileHeader actualUser={actualUser}/>
<PostsFeed/>
</Stack>
);
};
export default UserProfile;
Whitespace-only changes.
@@ -1,30 +0,0 @@
import React from 'react';
import {Card, CardContent, CardMedia, Typography} from "@mui/material";
import banner from "../../images/banner.jpg";
import pfp from "../../images/pfp.png";
const UserProfileHeader = ({actualUser}) => {
return (
<Card className="profileSection">
<CardMedia className="banner"
component="img"
image={banner}
alt="PP"
/>
<div className="profileCard">
<div className="profilePicBG">
<CardMedia className="profileAvatar"
component="img"
image={pfp}
alt="ProfilePic"
/>
</div>
<CardContent className="userSection">
<Typography variant="h5">{actualUser}</Typography>
</CardContent>
</div>
</Card>
);
};
export default UserProfileHeader;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
+25 -36
View File
@@ -1,43 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web home is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
<meta charset="utf-8"/>
<title>Superalgos Desktop</title>
<meta name="description" content="Free and Open Source Crypto Social Trading">
<link rel="icon" href="%PUBLIC_URL%/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<link rel="manifest" href="%PUBLIC_URL%/manifest.json"/>
<script type="text/javascript">
function loadApp() {
// Prevent click-jacking
try {
if (window === window.top || window.chrome && chrome.app && chrome.app.window) {
document.documentElement.style.display = 'block'
} else {
top.location = self.location
}
} catch (e) {
console.error('CJ protection', e)
}
}
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<body id="body" onload="loadApp()">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

-16
View File
@@ -1,16 +0,0 @@
import React from 'react';
import {Provider} from "react-redux";
import reducers from "../store";
import Root from "./Root";
const ReactBase = () => {
return (
<React.StrictMode>
<Provider store={reducers}>
<Root/>
</Provider>
</React.StrictMode>
);
};
export default ReactBase;
File renamed without changes.
File renamed without changes.
File renamed without changes.
+14 -2
View File
@@ -2,13 +2,25 @@ import './index.css';
import React from 'react';
import ReactDOM from 'react-dom';
import reportWebVitals from './reportWebVitals';
import ReactBase from "./components/ReactBase";
// import {SA, UI} from '../UI/Globals';
// import {loadSuperalgos} from '../UI/WebAppPreLoader'
import {Provider} from "react-redux";
import reducers from "./store";
import Root from "./components/Root";
// const store = createStore(reducers);
// loadSuperalgos();
// console.log(UI);
// console.log(SA);
ReactDOM.render(
<ReactBase/>,
<React.StrictMode>
<Provider store={reducers}>
<Root/>
</Provider>
</React.StrictMode>,
document.getElementById('root')
);
@@ -1,3 +1,5 @@
/* TODO migrate to react components*/
/* latin */
@font-face {
font-family: 'Saira';
@@ -21,11 +23,6 @@
font-weight: normal;
font-style: normal;
}
.body{
overflow-y: hidden;
overflow-x: hidden;
}
.scroll-div {
position:absolute;
-9
View File
@@ -1,9 +0,0 @@
import { configureStore } from '@reduxjs/toolkit';
import ExampleReducer from './slices/Example.slice'
export default configureStore({
reducer:{
example: ExampleReducer
}
})
-21
View File
@@ -1,21 +0,0 @@
import { createSlice } from '@reduxjs/toolkit'
export const ExampleSlice = createSlice({
name: 'example',
initialState: {
exampleName:'',
token:''
},
reducers: {
exampleAction: (state, action) => {
state.userName = action.payload;
},
},
})
// Action creators are generated for each case reducer function
export const { exampleAction } = ExampleSlice.actions
export default ExampleSlice.reducer