Better profile picture for users without one
Diff
chartered-frontend/src/util.tsx | 11 ++++++++++-
chartered-frontend/src/pages/Search.tsx | 2 ++
2 files changed, 11 insertions(+), 2 deletions(-)
@@ -1,6 +1,7 @@
import React = require("react");
import ReactPlaceholder from "react-placeholder";
import { AuthContext } from "./useAuth";
import {PersonFill} from "react-bootstrap-icons";
export const BASE_URL = process.env.BASE_URL || "http://localhost:8888";
@@ -95,9 +96,15 @@
} else {
return (
<div
className={`position-relative rounded-circle d-inline-block ${className}`}
className={`position-relative rounded-circle d-inline-flex justify-content-center align-items-center ${className}`}
style={{ width, height, background: "rgb(235, 235, 235)" }}
/>
>
<PersonFill style={{
width: `calc(${width} / 2)`,
height: `calc(${height} / 2)`,
color: "rgba(0, 0, 0, .1)"
}} />
</div>
);
}
}
@@ -181,6 +181,7 @@
<a
href={crate.homepage}
className="text-decoration-none me-2"
target="_blank"
>
Homepage
</a>
@@ -191,6 +192,7 @@
<a
href={crate.repository}
className="text-decoration-none me-2"
target="_blank"
>
Repository
</a>