Skip to content

Commit ea9236f

Browse files
committed
Implemented user signin, signup, user searching
1 parent 6bc513f commit ea9236f

File tree

7 files changed

+236
-37
lines changed

7 files changed

+236
-37
lines changed

package-lock.json

Lines changed: 121 additions & 5 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
@@ -31,6 +31,7 @@
3131
"@mui/material": "^5.14.12",
3232
"@vercel/analytics": "^1.2.2",
3333
"apexcharts": "^3.43.0",
34+
"axios": "^1.6.8",
3435
"date-fns": "^2.30.0",
3536
"history": "^5.3.0",
3637
"lodash": "^4.17.21",

src/sections/user/user-table-row.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function TextHighlight({ text, searchKeyword }) {
1818
useEffect(() => {
1919
if (searchKeyword) {
2020
const regex = new RegExp(`(${searchKeyword})`, 'gi');
21-
const parts = text.split(regex);
21+
const parts = text?.split(regex) ?? [];
2222
const newHighlightedText = parts.map((part, i) =>
2323
part.toLowerCase() === searchKeyword.toLowerCase() ? (
2424
<mark key={i}>{part}</mark>

src/sections/user/view/profile-card.jsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Stack from '@mui/material/Stack';
77
import Avatar from '@mui/material/Avatar';
88
import ListItem from '@mui/material/ListItem';
99
import MapIcon from '@mui/icons-material/Map';
10+
import GitHub from '@mui/icons-material/GitHub';
1011
import CardHeader from '@mui/material/CardHeader';
1112
import Typography from '@mui/material/Typography';
1213
import EmailIcon from '@mui/icons-material/Email';
@@ -117,6 +118,26 @@ const ProfileCard = ({
117118
</ListItemText>
118119
</ListItem>
119120
)}
121+
{
122+
followers && (
123+
<ListItem disableGutters>
124+
<ListItemIcon>
125+
<GitHub />
126+
</ListItemIcon>
127+
<ListItemText primary={`Followers: ${followers}`} />
128+
</ListItem>
129+
)
130+
}
131+
{
132+
following && (
133+
<ListItem disableGutters>
134+
<ListItemIcon>
135+
<GitHub />
136+
</ListItemIcon>
137+
<ListItemText primary={`Following: ${following}`} />
138+
</ListItem>
139+
)
140+
}
120141
</Stack>
121142
</CardContent>
122143
</Card>

0 commit comments

Comments
 (0)