Skip to content

Commit

Permalink
fix(client): some small improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-ojha committed Jun 29, 2022
1 parent a6939ab commit a7ef757
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions client/src/components/MainPageMsgAndNtfBar.tsx
Expand Up @@ -48,6 +48,7 @@ const MainPageMsgAndNtfBar = () => {
const isMax850px = useMediaQuery({
query: `(max-width:${constant.mediaQueryRes.screen850}px)`,
});

const {
mainPageMessageViewOnOff,
openNotificationBox,
Expand Down
6 changes: 5 additions & 1 deletion client/src/pages/GetUserID.tsx
Expand Up @@ -13,7 +13,11 @@ import { actionCreators } from "../services/redux";
import UserDocument from "../interface/userDocument";
import { AxiosError } from "axios";

const GetUserID = (props): JSX.Element => {
interface GetUserIDProps {
userDetail: UserDocument;
}

const GetUserID: React.FC<GetUserIDProps> = (props): JSX.Element => {
const dispatch = useDispatch();
const [userDetail, setUserDetail] = useState<{
email: UserDocument["email"];
Expand Down
10 changes: 8 additions & 2 deletions controllers/storage.controller.ts
Expand Up @@ -207,11 +207,17 @@ export default {
});
}
}
console.log(file);
if (!req.file) {
console.log("not picture");
const resData = await userDetail.updateOne(
{ email: email },
{ $set: { userID: userID } }
{
$set: {
userID: userID,
picture:
"https://firebasestorage.googleapis.com/v0/b/social-application-326411.appspot.com/o/default%2FUser_profile_Icon.png?alt=media&token=cb51f25a-39d3-4614-a652-06086dbcb27a",
},
}
);
return res
.status(200)
Expand Down

0 comments on commit a7ef757

Please sign in to comment.