Skip to content

Commit

Permalink
patch: redux store
Browse files Browse the repository at this point in the history
  • Loading branch information
AlayKharadi committed May 25, 2022
1 parent 56a25d8 commit b4835c0
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Suspense } from 'react';
import { Spinner } from 'react-bootstrap';
import { BrowserRouter, Route, Routes, Navigate } from "react-router-dom";
import CustomNavbar from "./components/CustomNavbar";
import { $navlinks } from './storage/navlinks';
import { $navlinks } from './redux/navlinks';

const App = () => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Control.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import style from '../styles/style.module.css';
import { userStore } from '../storage/store';
import * as action_type from "../storage/actiontype";
import { userStore } from '../redux/store';
import * as action_type from "../redux/actiontype";
import ROSLIB from 'roslib';
import { useSelector } from "react-redux";
import { useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CustomNavbar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NavLink } from 'react-router-dom';
import { Container, Nav, Navbar } from 'react-bootstrap';
import { $navlinks } from '../storage/navlinks.js';
import { $navlinks } from '../redux/navlinks.js';

const CustomNavbar = () => {

Expand Down
1 change: 0 additions & 1 deletion src/components/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const Online = lazy(() => import('./Online'));


const Home = () => {
console.log("home")
const [key, setKey] = useState('offline');

return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Offline.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const Offline = () => {
<p>Write <code>ws://localhost:9090</code> or <code>ws://127.0.0.1:9090</code> it in our website's control section's websocket server address field.</p>
</li>
<li>
<p>controller will be enabled as soon as you click <code>connect</code> button.</p>
<p>controller will be enabled as soon as you click the <code>connect</code> button.</p>
</li>
<li>
<p>Put <code>/turtle1/cmd_vel</code> in the Topic Name to use controller.</p>
<p>Put <code>/turtle1/cmd_vel</code> in the Topic Name to use the controller.</p>
</li>
<li>
<p>You are good to go.</p>
Expand Down
12 changes: 6 additions & 6 deletions src/components/Online.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ const Online = () => {
<p>create an account.</p>
</li>
<li>
<p>Search Project "<code>Developing Web Interfaces for ROS</code>" in the searchbar.</p>
<p>Search Project "<code>Developing Web Interfaces for ROS</code>" in the search bar.</p>
</li>
<li>
<p>Open the project you will see termial, Documentation, IDE and simulator.</p>
<p>we will use termial and simulator.</p>
<p>Open the project you will see terminal, Documentation, IDE and simulator.</p>
<p>We will use only the terminal and simulator.</p>
</li>
<li>
<p>Run ROSBridge Websocket Server via terminal</p>
<p>Command : <code>roslaunch course_web_dev_ros web.launch</code></p>
</li>
<li>
<p>Run the below command to get server link.</p>
<p>Run the below command to get server the link.</p>
<p>Command : <code>rosbridge_address</code></p>
</li>
<li>
<p>copy the link and paste it in our website's control section's websocket server address field.</p>
</li>
<li>
<p>controller will be enabled as soon as you click <code>connect</code> button.</p>
<p>controller will be enabled as soon as you click the <code>connect</code> button.</p>
</li>
<li>
<p>Put <code>/cmd_vel</code> in the Topic Name to use controller.</p>
<p>Put <code>/cmd_vel</code> in the Topic Name to use the controller.</p>
</li>
<li>
<p>You are good to go.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App';
import { Provider } from "react-redux";
import { userStore } from './storage/store';
import { userStore } from './redux/store';

createRoot(document.getElementById('root'))
.render(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/storage/store.js → src/redux/store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createStore } from 'redux';
import { legacy_createStore } from 'redux';
import reducer from './reducer';

//creating the store using the given reducer function
Expand All @@ -13,7 +13,7 @@ let initialuserStore = {
};

//create the global storage
export const userStore = createStore(
export const userStore = legacy_createStore(
reducer,
initialuserStore,
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
Expand Down

1 comment on commit b4835c0

@vercel
Copy link

@vercel vercel bot commented on b4835c0 May 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ros-web-app – ./

ros-web-app-alaykharadi.vercel.app
ros-web-app.vercel.app
ros-web-app-git-main-alaykharadi.vercel.app

Please sign in to comment.