Skip to content

Commit

Permalink
added favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhKaranth committed Feb 21, 2023
1 parent 35ab390 commit 862cce4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
Binary file modified client/public/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
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>
<title>Pinterest-clone</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file removed client/public/logo192.png
Binary file not shown.
Binary file removed client/public/logo512.png
Binary file not shown.
11 changes: 9 additions & 2 deletions client/src/components/CreatePin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import FileBase64 from 'react-file-base64'
import './createPin.css'
import { useAppContext } from '../context/appContext';
import { Link } from 'react-router-dom';
import Alert from './Alert';
import Spinner from './Spinner'

const CreatePin = () => {
const { user, user_id, createPin } = useAppContext();
const { user, user_id, createPin, showAlert, isLoading } = useAppContext();

const [image, setImage] = useState("")
const [title, setTitle] = useState("")
Expand Down Expand Up @@ -40,8 +42,13 @@ const CreatePin = () => {

}
return (
<div className='h-screen' >
<div className='h-screen relative' >
<Navbar />
{showAlert &&
<div className='w-full absolute'>
<Alert/>
{isLoading && <Spinner message={"Loading"} />}
</div>}
<div className=' h-full w-full flex items-start justify-center ' style={{ "backgroundColor": "#efefef" }}>

<form className='flex flex-col h-full w-full my-1 mx-1 sm:hidden bg-white rounded-sm' onSubmit={handleSubmit}>
Expand Down
3 changes: 2 additions & 1 deletion client/src/context/appContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const AppProvider = ({ children }) => {
const [state, dispatch] = useReducer(reducer, initialState);

const authFetch = axios.create({
baseURL: 'http://localhost:5000/api/v1',
baseURL: 'https://pinterest-clone-i8fo.onrender.com/api/v1',

})

Expand Down Expand Up @@ -205,6 +205,7 @@ const AppProvider = ({ children }) => {
}
})
dispatch({ type: SUCCESS })
displayAlert("Pin created successfully", "success")
return true
} catch (error) {
dispatch({ type: ERROR })
Expand Down

0 comments on commit 862cce4

Please sign in to comment.