update src/Views/Home/Sidebar/index.js and store.js

master
mahdi 3 years ago
parent ea74009e7d
commit 01fe974648
  1. 11
      src/Views/Home/Sidebar/index.js
  2. 8
      src/redux/store.js

@ -4,24 +4,21 @@ import { components } from "../../../redux/actions";
function Sidebar({ list, setActive }) {
return (
<div
className="lg:flex lg:flex-col lg:w-1/6 lg:h-full"
style={{ direction: "ltr" }}
>
<header className="w-full flex flex-row items-center h-16 px-1 py-4 bg-gray-700">
<div className="lg:flex lg:flex-col lg:w-1/6 lg:h-full ltr">
<header className="w-full h-16 flex flex-row items-center py-4 px-4 bg-gray-600">
<img
src={"https://barnamenegar.ir/static/media/white logo 2.7ffbddbc.svg"}
alt="logo"
className="w-full"
/>
</header>
<ul className="w-full flex-1 p-0 m-0 list-none divided divide-y max-h-full overflow-y-scroll divide-blue-100 border-r border-gray-200">
<ul className="w-full max-h-full flex-1 p-0 m-0 list-none divided divide-y overflow-y-scroll divide-blue-600 border-r border-gray-600">
{list
.sort((a, b) => (a.name > b.name ? 1 : -1))
.map((material, index) => (
<li
key={index}
className="w-full py-3 px-3 font-medium text-md cursor-pointer h-12"
className="w-full h-12 py-3 px-3 cursor-pointer"
onClick={() => setActive(material)}
>
{material.name}

@ -3,17 +3,9 @@ import { composeWithDevTools } from "redux-devtools-extension";
import thunk from "redux-thunk";
import * as reducers from "./reducers";
// import { persistStore, persistReducer } from "redux-persist";
// import storage from "redux-persist/lib/storage"; // defaults to localStorage for web
const initialState = {};
const middleware = [thunk];
// const persistConfig = {
// key: "root",
// storage,
// };
const store = createStore(
combineReducers(reducers),
initialState,

Loading…
Cancel
Save