Skip to content

Commit ce0d514

Browse files
committed
Release version 2.0.0
1 parent 22b7890 commit ce0d514

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+4764
-100
lines changed

.vscode/settings.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
{
2-
"git.enabled": true
2+
"git.enabled": true,
3+
"workbench.colorCustomizations": {
4+
"activityBar.activeBackground": "#93e6fc",
5+
"activityBar.background": "#93e6fc",
6+
"activityBar.foreground": "#15202b",
7+
"activityBar.inactiveForeground": "#15202b99",
8+
"activityBarBadge.background": "#fa45d4",
9+
"activityBarBadge.foreground": "#15202b",
10+
"commandCenter.border": "#15202b99",
11+
"sash.hoverBorder": "#93e6fc",
12+
"statusBar.background": "#61dafb",
13+
"statusBar.foreground": "#15202b",
14+
"statusBarItem.hoverBackground": "#2fcefa",
15+
"statusBarItem.remoteBackground": "#61dafb",
16+
"statusBarItem.remoteForeground": "#15202b",
17+
"titleBar.activeBackground": "#61dafb",
18+
"titleBar.activeForeground": "#15202b",
19+
"titleBar.inactiveBackground": "#61dafb99",
20+
"titleBar.inactiveForeground": "#15202b99"
21+
},
22+
"peacock.color": "#61dafb"
323
}

package-lock.json

Lines changed: 135 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"react-simple-image-viewer": "^1.2.2",
3636
"react-spinners": "^0.13.7",
3737
"redux": "^4.2.0",
38+
"socket.io-client": "^4.5.4",
3839
"styled-components": "^5.3.6",
3940
"web-vitals": "^2.1.0",
4041
"yup": "^0.32.11"

public/icons/icons39.png

11.1 KB
Loading

public/reacts/comment.svg

Lines changed: 9 additions & 0 deletions
Loading

public/reacts/follow.svg

Lines changed: 9 additions & 0 deletions
Loading

public/reacts/friend.svg

Lines changed: 9 additions & 0 deletions
Loading

public/reacts/message.svg

Lines changed: 9 additions & 0 deletions
Loading

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function App() {
3939
<QueryClientProvider client={queryClient}>
4040
{createPost.isOpen && <CreatePostPopup user={user} />}
4141
<Portal>
42-
<Toaster position="bottom-left" reverseOrder={true} />
42+
<Toaster position="bottom-left" reverseOrder={false} />
4343
</Portal>
4444
<Router />
4545
</QueryClientProvider>

src/app/slices/soketSlice.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { createSlice } from "@reduxjs/toolkit";
2+
3+
// type = ['normal','image','background']
4+
5+
const initialValue = {
6+
onlineUsers: [],
7+
selectedChat: null,
8+
};
9+
export const createSoketSlice = createSlice({
10+
name: "soketSlice",
11+
initialState: initialValue,
12+
13+
reducers: {
14+
setOnlineUsers: (state, action) => {
15+
const { type, info } = action.payload;
16+
if (
17+
type === "add" &&
18+
!state.onlineUsers.find((u) => u?.id === info?.id)
19+
) {
20+
state.onlineUsers = [...state.onlineUsers, info];
21+
} else if (type === "remove") {
22+
state.onlineUsers = state.onlineUsers.filter((u) => u?.id !== info?.id);
23+
} else if (type === "connect") {
24+
state.onlineUsers = info;
25+
}
26+
},
27+
setSelectedChat: (state, action) => {
28+
state.selectedChat = action.payload;
29+
},
30+
},
31+
});
32+
export const { setOnlineUsers, setSelectedChat } = createSoketSlice.actions;
33+
34+
export default createSoketSlice.reducer;

0 commit comments

Comments
 (0)