Skip to content

Commit

Permalink
add prettier files
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-saini1 committed Oct 21, 2022
1 parent 5494cc6 commit 14e6ff4
Show file tree
Hide file tree
Showing 106 changed files with 5,141 additions and 3,788 deletions.
6 changes: 2 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"presets": [
"@babel/preset-react"
],
"plugins": ["@babel/plugin-syntax-jsx"]
"presets": ["@babel/preset-react"],
"plugins": ["@babel/plugin-syntax-jsx"]
}
8 changes: 2 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@
"react/jsx-indent": "off",
"import/prefer-default-export": "off",
"react/jsx-indent-props": "off",
"react/jsx-props-no-spreading" : "off",
"react/jsx-props-no-spreading": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"no-param-reassign": [2, { "props": false }]
},
"ignorePatterns": [
"dist/",
"build/"
]
"ignorePatterns": ["dist/", "build/"]
}

6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package.json
package-lock.json

*.md
*.svg
*.lock
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"rangeStart": 0,
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf",
"embeddedLanguageFormatting": "auto"
}
4 changes: 2 additions & 2 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/* eslint-disable global-require */
module.exports = {
babel: {
plugins: ['babel-plugin-macros'],
plugins: ["babel-plugin-macros"],
},
style: {
postcss: {
plugins: [require('tailwindcss'), require('autoprefixer')],
plugins: [require("tailwindcss"), require("autoprefixer")],
},
},
};
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
rel="stylesheet"
/>
<!-- Campton -->
<link href="https://fonts.cdnfonts.com/css/campton" rel="stylesheet">
<link href="https://fonts.cdnfonts.com/css/campton" rel="stylesheet" />
<title>Vite + React</title>
</head>
<body>
Expand Down
7 changes: 2 additions & 5 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import React from "react";
import { BrowserRouter} from "react-router-dom";
import { BrowserRouter } from "react-router-dom";
import Routes from "./Routes";

function App() {
return (
//Any Routes added here won't be merged, please check the routes.jsx file, follow the pattern and add any additional routes.
<BrowserRouter>
<Routes>
</Routes>

<Routes></Routes>
</BrowserRouter>
);
}

export default App;

239 changes: 103 additions & 136 deletions src/Routes.jsx
Original file line number Diff line number Diff line change
@@ -1,150 +1,117 @@
import React from 'react';
import { Route, Routes as Switch, Link } from 'react-router-dom';
import AddNewProductPage1 from './pages/AddNewProductPage1';
import PhoneNumberVerification from './pages/PhoneNumberVerification';
import Login from './pages/Login';
import Help from './pages/HelpandSupport';
import DashboardPage from './pages/DashboardPage';
import Kyc from './pages/Kyc';
import EmailVerify from './pages/EmailVerify';
import Home from './pages/Home';
import ViewProducts from './components/molecules/Products';
import EmptyWishlistViewProducts from './pages/EmptyWishlistViewProducts';
import WishlistViewProducts from './pages/WishlistViewProducts';
import CreateAccount from './pages/CreateAccount';
import DeleteProduct from './components/molecules/deleteProduct';
import ResetPasswordPage from './pages/PasswordResetPage';
import Users from './pages/Users';
import PageNotFound from './pages/404';
import AdminDashBoardLayout from './templates/AdminDashBoardLayout';
import CreateSubAdmin from './pages/CreateSubAdmin';
import SubAdminProfilePage from './pages/SubAdminProfile';
import EditProductDetails from './components/molecules/EditProductDetails';
import React from "react";
import { Route, Routes as Switch, Link } from "react-router-dom";
import AddNewProductPage1 from "./pages/AddNewProductPage1";
import PhoneNumberVerification from "./pages/PhoneNumberVerification";
import Login from "./pages/Login";
import Help from "./pages/HelpandSupport";
import DashboardPage from "./pages/DashboardPage";
import Kyc from "./pages/Kyc";
import EmailVerify from "./pages/EmailVerify";
import Home from "./pages/Home";
import ViewProducts from "./components/molecules/Products";
import EmptyWishlistViewProducts from "./pages/EmptyWishlistViewProducts";
import WishlistViewProducts from "./pages/WishlistViewProducts";
import CreateAccount from "./pages/CreateAccount";
import DeleteProduct from "./components/molecules/deleteProduct";
import ResetPasswordPage from "./pages/PasswordResetPage";
import Users from "./pages/Users";
import PageNotFound from "./pages/404";
import AdminDashBoardLayout from "./templates/AdminDashBoardLayout";
import CreateSubAdmin from "./pages/CreateSubAdmin";
import SubAdminProfilePage from "./pages/SubAdminProfile";
import EditProductDetails from "./components/molecules/EditProductDetails";

import UserList from './pages/UserList.jsx';
import SubAdminList from './pages/SubAdminList';
import SuspendedUsersList from './pages/SuspendedUsersList';
import AdminUsersProfile from './pages/AdminUsersProfile';
import UserList from "./pages/UserList.jsx";
import SubAdminList from "./pages/SubAdminList";
import SuspendedUsersList from "./pages/SuspendedUsersList";
import AdminUsersProfile from "./pages/AdminUsersProfile";

import MessagesEmpty from './pages/MessagesEmpty';
import MessagesStart from './pages/MessagesStart';
import MessagesChat from './pages/MessagesChat';
import MessagesEmpty from "./pages/MessagesEmpty";
import MessagesStart from "./pages/MessagesStart";
import MessagesChat from "./pages/MessagesChat";

import AdminUsersProfileWithProducts from './pages/AdminUsersProfileWithProducts';
import AdminUsersProfileWithProducts from "./pages/AdminUsersProfileWithProducts";

// Routes Component Containing Routes For All Base Pages.
function Routes() {
return (
<Switch>
<Route path='*' element={<PageNotFound />} />
<Route path='/' element={<Home />} />
<Route path='/products' element={<AddNewProductPage1 />} />
<Route path='/login' element={<Login />} />
<Route path='/create-account' element={<CreateAccount />} />
<Route
path='/view-products'
element={
<>
<ViewProducts />
</>
}
/>
<Route path='/email-verification' element={<EmailVerify />} />
<Route
path='/phone-verification'
element={<PhoneNumberVerification />}
/>
return (
<Switch>
<Route path="*" element={<PageNotFound />} />
<Route path="/" element={<Home />} />
<Route path="/products" element={<AddNewProductPage1 />} />
<Route path="/login" element={<Login />} />
<Route path="/create-account" element={<CreateAccount />} />
<Route
path="/view-products"
element={
<>
<ViewProducts />
</>
}
/>
<Route path="/email-verification" element={<EmailVerify />} />
<Route path="/phone-verification" element={<PhoneNumberVerification />} />

{/* Protected Pages */}
<Route path='/dashboard' element={<DashboardPage />} />
<Route element={<AdminDashBoardLayout />}>
<Route
path='/admin/dashboard'
element={<h1> create dashboard</h1>}
/>
<Route
path='/admin/products'
element={<h1> Admin producet </h1>}
/>
{/* Protected Pages */}
<Route path="/dashboard" element={<DashboardPage />} />
<Route element={<AdminDashBoardLayout />}>
<Route path="/admin/dashboard" element={<h1> create dashboard</h1>} />
<Route path="/admin/products" element={<h1> Admin producet </h1>} />

<Route path="/admin/messages" element={<MessagesEmpty />} />
<Route path="/admin/messages/start" element={<MessagesStart />} />
<Route path="/admin/messages/chat" element={<MessagesChat />} />
<Route path="/admin/messages" element={<MessagesEmpty />} />
<Route path="/admin/messages/start" element={<MessagesStart />} />
<Route path="/admin/messages/chat" element={<MessagesChat />} />

<Route path='/admin/users' element={<Users />} />
<Route path='/admin/users/userlist' element={<UserList />} />
<Route
path='/admin/users/subadminlist'
element={<SubAdminList />}
/>
<Route
path='/admin/users/suspendedusers'
element={<SuspendedUsersList />}
/>
<Route
path='/admin/users/profile'
element={<AdminUsersProfile />}
/>
<Route path="/admin/users" element={<Users />} />
<Route path="/admin/users/userlist" element={<UserList />} />
<Route path="/admin/users/subadminlist" element={<SubAdminList />} />
<Route
path="/admin/users/suspendedusers"
element={<SuspendedUsersList />}
/>
<Route path="/admin/users/profile" element={<AdminUsersProfile />} />

<Route
path='/admin/users/profile-with-products'
element={<AdminUsersProfileWithProducts />}
/>
<Route
path='/admin/create-sub-admin'
element={<CreateSubAdmin />}
/>
<Route
path='/admin/sub-admin-profile'
element={<SubAdminProfilePage />}
/>
<Route
path="/admin/users/profile-with-products"
element={<AdminUsersProfileWithProducts />}
/>
<Route path="/admin/create-sub-admin" element={<CreateSubAdmin />} />
<Route
path="/admin/sub-admin-profile"
element={<SubAdminProfilePage />}
/>

<Route path='/admin/profile' element={<h2> profile </h2>} />
</Route>
<Route path='/kyc' element={<Kyc />} />
<Route path='/products' element={<AddNewProductPage1 />} />
<Route path='/delete-product' element={<DeleteProduct />} />
{/* <Route path="/view-products" element={<ViewProduct />} /> */}
<Route path='/wishlist' element={<WishlistViewProducts />} />
<Route
path='/add-to-wishlist'
element={<EmptyWishlistViewProducts />}
/>
<Route path='/reset-password' element={<ResetPasswordPage />} />
<Route path='/support' element={<Help />} />
{/* <Route path="/account-recovery" element={<ForgotPassword />}/> */}
<Route
path='/messages'
element={
<h1 className='text-3xl font-bold text-red-600'>
Messages
</h1>
}
/>
<Route
path='/wishlist'
element={
<h1 className='text-3xl font-bold text-red-600'>
Wishlist
</h1>
}
/>
<Route
path='/notifications'
element={
<h1 className='text-3xl font-bold text-red-600'>
Notifications
</h1>
}
/>
<Route
path='/profile'
element={
<h1 className='text-3xl font-bold text-red-600'>Profile</h1>
}
/>
</Switch>
);
<Route path="/admin/profile" element={<h2> profile </h2>} />
</Route>
<Route path="/kyc" element={<Kyc />} />
<Route path="/products" element={<AddNewProductPage1 />} />
<Route path="/delete-product" element={<DeleteProduct />} />
{/* <Route path="/view-products" element={<ViewProduct />} /> */}
<Route path="/wishlist" element={<WishlistViewProducts />} />
<Route path="/add-to-wishlist" element={<EmptyWishlistViewProducts />} />
<Route path="/reset-password" element={<ResetPasswordPage />} />
<Route path="/support" element={<Help />} />
{/* <Route path="/account-recovery" element={<ForgotPassword />}/> */}
<Route
path="/messages"
element={<h1 className="text-3xl font-bold text-red-600">Messages</h1>}
/>
<Route
path="/wishlist"
element={<h1 className="text-3xl font-bold text-red-600">Wishlist</h1>}
/>
<Route
path="/notifications"
element={
<h1 className="text-3xl font-bold text-red-600">Notifications</h1>
}
/>
<Route
path="/profile"
element={<h1 className="text-3xl font-bold text-red-600">Profile</h1>}
/>
</Switch>
);
}

export default Routes;
Loading

0 comments on commit 14e6ff4

Please sign in to comment.