fix: capitalize username in Header component and update state management in AisleCreator
This commit is contained in:
parent
a6c1e039eb
commit
2cc45817a9
|
@ -114,7 +114,7 @@ const Header: React.FC = () => {
|
|||
))}
|
||||
</div>
|
||||
<div className="user-profile-container">
|
||||
<div className="user-profile">{userName}</div>
|
||||
<div className="user-profile">{userName?.charAt(0).toUpperCase()}</div>
|
||||
<div className="user-organization">
|
||||
<img src={orgImg} alt="" />
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@ function AisleCreator() {
|
|||
|
||||
const [tempPoints, setTempPoints] = useState<Point[]>([]);
|
||||
const [isCreating, setIsCreating] = useState(false);
|
||||
const { aisleType, aisleWidth, aisleColor, dashLength, gapLength, dotRadius, aisleLength, isFlipped, snappedPosition, snappedPoint } = useBuilderStore();
|
||||
const { aisleType, aisleWidth, aisleColor, dashLength, gapLength, dotRadius, aisleLength, isFlipped, snappedPosition, snappedPoint, setSnappedPosition, setSnappedPoint } = useBuilderStore();
|
||||
|
||||
useEffect(() => {
|
||||
const canvasElement = gl.domElement;
|
||||
|
@ -270,6 +270,10 @@ function AisleCreator() {
|
|||
};
|
||||
|
||||
if (toolMode === "Aisle" && toggleView) {
|
||||
if (tempPoints.length === 0) {
|
||||
setSnappedPosition(null);
|
||||
setSnappedPoint(null);
|
||||
}
|
||||
canvasElement.addEventListener("mousedown", onMouseDown);
|
||||
canvasElement.addEventListener("mouseup", onMouseUp);
|
||||
canvasElement.addEventListener("mousemove", onMouseMove);
|
||||
|
|
Loading…
Reference in New Issue