Skip to content

Commit

Permalink
a minor modifications on client and server folders
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkiriungi committed Jan 18, 2024
1 parent 20e03b5 commit d1faf06
Show file tree
Hide file tree
Showing 48 changed files with 3,997 additions and 21 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file removed client/public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions client/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -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>Shadapedia</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.
3 changes: 0 additions & 3 deletions client/public/robots.txt

This file was deleted.

2 changes: 1 addition & 1 deletion client/src/components/Friend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Friend = ({ friendId, name, subtitle, userPicturePath }) => {

const patchFriend = async () => {
const response = await fetch(
`http://localhost:3001/users/${_id}/${friendId}`,
`https://shadapedia.onrender.com/users/${_id}/${friendId}`,
{
method: "PATCH",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/UserImage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const UserImage = ({ image, size="60px" }) => {
width={size}
height={size}
alt="user"
src={`http://localhost:3001/assets/${image}`}
src={`https://shadapedia.onrender.com/assets/${image}`}
/>
</Box>
);
Expand Down
4 changes: 2 additions & 2 deletions client/src/scenes/loginPage/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Form = () => {
formData.append("picturePath", values.picture.name);

const savedUserResponse = await fetch(
"http://localhost:3001/auth/register",
"https://shadapedia.onrender.com/auth/register",
{
method: "POST",
body: formData,
Expand All @@ -79,7 +79,7 @@ const Form = () => {
};

const login = async (values, onSubmitProps) => {
const loggedInResponse = await fetch("http://localhost:3001/auth/login", {
const loggedInResponse = await fetch("https://shadapedia.onrender.com/auth/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(values),
Expand Down
2 changes: 1 addition & 1 deletion client/src/scenes/profilePage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ProfilePage = () => {
const isNonMobileScreens = useMediaQuery("(min-width: 1000px)");

const getUser = async () => {
const response = await fetch(`http://localhost:3001/users/${userId}`, {
const response = await fetch(`https://shadapedia.onrender.com/users/${userId}`, {
method: "GET",
headers: { Authorization: `Bearer ${token}`},
})
Expand Down
2 changes: 1 addition & 1 deletion client/src/scenes/widgets/AdvertWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const AdvertWidget = () => {
width="100%"
height="auto"
alt="advert"
src="http://localhost:3001/assets/info4.jpeg"
src="https://shadapedia.onrender.com/assets/info4.jpeg"
style={{ borderRadius: "0.75rem", margin: "0.75rem 0" }}
/>
<FlexBetween>
Expand Down
2 changes: 1 addition & 1 deletion client/src/scenes/widgets/FriendListWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const FriendListWidget = ({ userId }) => {

const getFriends = async () => {
const response = await fetch(
`http://localhost:3001/users/${userId}/friends`,
`https://shadapedia.onrender.com/users/${userId}/friends`,
{
method: "GET",
headers: { Authorization: `Bearer ${token}` },
Expand Down
2 changes: 1 addition & 1 deletion client/src/scenes/widgets/MyPostWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {
formData.append("picturePath", image.name);
}

const response = await fetch(`http://localhost:3001/posts`, {
const response = await fetch(`https://shadapedia.onrender.com/posts`, {
method: "POST",
headers: { Authorization: `Bearer ${token}` },
body: formData,
Expand Down
4 changes: 2 additions & 2 deletions client/src/scenes/widgets/PostWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
const primary = palette.primary.main;

const patchLike = async () => {
const response = await fetch(`http://localhost:3001/posts/${postId}/like`, {
const response = await fetch(`https://shadapedia.onrender.com/posts/${postId}/like`, {
method: "PATCH",
headers: {
Authorization: `Bearer ${token}`,
Expand Down Expand Up @@ -64,7 +64,7 @@ import {
height="auto"
alt="post"
style={{ borderRadius: "0.75rem", marginTop: "0.75rem" }}
src={`http://localhost:3001/assets/${picturePath}`}
src={`https://shadapedia.onrender.com/assets/${picturePath}`}
/>
)}
<FlexBetween mt="0.25rem">
Expand Down
4 changes: 2 additions & 2 deletions client/src/scenes/widgets/PostsWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const PostsWidget = ({ userId, isProfile = false }) => {
const token = useSelector((state) => state.token);

const getPosts = async () => {
const response = await fetch("http://localhost:3001/posts", {
const response = await fetch("https://shadapedia.onrender.com/posts", {
method: "GET",
headers: { Authorization: `Bearer ${token}` },
});
Expand All @@ -19,7 +19,7 @@ const PostsWidget = ({ userId, isProfile = false }) => {

const getUserPosts = async () => {
const response = await fetch(
`http://localhost:3001/posts/${userId}/posts`,
`https://shadapedia.onrender.com/posts/${userId}/posts`,
{
method: "GET",
headers: { Authorization: `Bearer ${token}` },
Expand Down
2 changes: 1 addition & 1 deletion client/src/scenes/widgets/UserWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
const main = palette.neutral.main;

const getUser = async () => {
const response = await fetch(`http://localhost:3001/users/${userId}`, {
const response = await fetch(`https://shadapedia.onrender.com/users/${userId}`, {
method: "GET",
headers: { Authorization: `Bearer ${token}` },
});
Expand Down
5 changes: 5 additions & 0 deletions server/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions server/node_modules/bcryptjs/.npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions server/node_modules/bcryptjs/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions server/node_modules/bcryptjs/.vscode/settings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions server/node_modules/bcryptjs/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d1faf06

Please sign in to comment.