Skip to content

Commit

Permalink
feat: implement story feature
Browse files Browse the repository at this point in the history
* protectedRoutes: implement protected protectedRoutes
* refactor: refactor code improve naming convention
* fix: like in profile page
* reduxQuery: implement redux toolkit query for efficient data fetching
  • Loading branch information
salman-aziz-4425 authored and Salman4426 committed Aug 18, 2023
1 parent eec97b7 commit cce9432
Show file tree
Hide file tree
Showing 72 changed files with 2,828 additions and 1,784 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL="http://localhost:8000"
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ module.exports = {
semi: ['error', 'never'],
'react/prop-types': 0,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error'
'react-hooks/exhaustive-deps': 'error',
}
}
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:18-alpine

WORKDIR /app

COPY package.json .

RUN npm install

COPY . .

CMD [ "npm","run","dev" ]
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/instagram.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Instagram(Dev)</title>
<title>Instagram</title>
</head>
<body>
<div id="root"></div>
Expand Down
Binary file added public/instagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Routes, Route, Navigate } from 'react-router-dom'
import { useSelector } from 'react-redux'
import Login from './Pages/Login'

import Login from './pages/Login'
import './index.css'
import Registeration from './Pages/Registeration'
import Home from './Pages/Home'
import Profile from './Pages/Profile'
import Registeration from './pages/Registeration'
import Home from './pages/Home'
import Profile from './pages/Profile'

function App() {
const PrivateRoute = ({ isAuth, children }) => {
Expand All @@ -21,7 +22,7 @@ function App() {
return <Navigate to="/Home" />
}

const isAuth = useSelector((state) => state.persistedReducer?.isAuth) || false
const isAuth = useSelector((state) => state.user.isAuth) || false

return (
<div className="App">
Expand Down
10 changes: 0 additions & 10 deletions src/Components/Loader.jsx

This file was deleted.

66 changes: 0 additions & 66 deletions src/Components/Search.jsx

This file was deleted.

18 changes: 0 additions & 18 deletions src/Components/UI/Input.jsx

This file was deleted.

25 changes: 0 additions & 25 deletions src/Components/UI/antd.jsx

This file was deleted.

38 changes: 0 additions & 38 deletions src/Components/comment/CommentCard.jsx

This file was deleted.

Loading

0 comments on commit cce9432

Please sign in to comment.