chat input now always sits at the bottom of the chat; has a divider

This commit is contained in:
Carter 2024-12-06 13:30:09 -06:00
parent c31712464b
commit 30f0d671af
5 changed files with 35 additions and 106 deletions

View file

@ -24,14 +24,12 @@ import {
Typography
} from "@mui/material";
import { green, red } from "@mui/material/colors";
// import { Theme } from "@mui/material/styles/createMuiTheme";
import {
Add as AddIcon,
Link as LinkIcon,
LinkOff,
RemoveCircle as RemoveCircleIcon
} from "@mui/icons-material";
// import { MobileDateTimePicker } from "@mui/utils/pi";
import { MobileDateTimePicker } from '@mui/x-date-pickers';
import ResponsiveDialog from "common/ResponsiveDialog";
import { usePermissionAPI, usePrevious, useSnackbar } from "hooks";
@ -41,7 +39,6 @@ import moment, { Moment } from "moment";
import { pond } from "protobuf-ts/pond";
import React, { useCallback, useEffect, useState } from "react";
import { openSnackbar } from "providers/Snackbar";
// import { Status } from "@sentry/react";
import { useBinAPI, useGateAPI } from "providers";
import { makeStyles } from "@mui/styles";
@ -131,7 +128,7 @@ export default function ShareObject(props: Props) {
resp.data.bins.forEach(bin => {
if (bin.settings) {
let newScope = binScope(bin.settings?.key);
permissionAPI.shareObject(newScope, email, sharedPermissions).catch(err => {
permissionAPI.shareObject(newScope, email, sharedPermissions).catch(_err => {
successBins = false;
});
}
@ -161,7 +158,7 @@ export default function ShareObject(props: Props) {
resp.data.gates.forEach(gate => {
if (gate) {
let newScope = { key: gate.key, kind: "gate" } as Scope;
permissionAPI.shareObject(newScope, email, sharedPermissions).catch(err => {
permissionAPI.shareObject(newScope, email, sharedPermissions).catch(_err => {
successGates = false;
});
}
@ -175,7 +172,7 @@ export default function ShareObject(props: Props) {
}
closeAfterShare();
})
.catch((err: any) => {
.catch((_err: any) => {
error("Unable to share " + label + " with " + email);
close();
});
@ -192,7 +189,7 @@ export default function ShareObject(props: Props) {
);
setShareableLinks(rShareableLinks);
})
.catch((error: any) => {
.catch((_error: any) => {
setShareableLinks([]);
console.log("Error occured while loading shareable links");
})
@ -215,10 +212,10 @@ export default function ShareObject(props: Props) {
const expiration = isNewLinkInfinite ? getNeverExpires() : newLinkExpiration.toISOString();
permissionAPI
.addShareableLink(scope, expiration)
.then((response: any) => {
.then((_response: any) => {
loadShareableLinks();
})
.catch((error: any) => {
.catch((_error: any) => {
console.log("Error occured while creating shareable link");
});
};
@ -226,10 +223,10 @@ export default function ShareObject(props: Props) {
const revokeShareableLink = (code: string) => {
permissionAPI
.removeShareableLink(scope, code)
.then((response: any) => {
.then((_response: any) => {
loadShareableLinks();
})
.catch((error: any) => {
.catch((_error: any) => {
console.log("Error occured while removing the shareable link");
});
};
@ -295,7 +292,7 @@ export default function ShareObject(props: Props) {
setSharedPermissions(updatedSharedPermissions);
};
const changeTab = (event: any, newTab: number) => {
const changeTab = (_event: any, newTab: number) => {
setTab(newTab);
};