diff --git a/src/app/LoadingScreen.tsx b/src/app/LoadingScreen.tsx
index ae808b8..7ba258a 100644
--- a/src/app/LoadingScreen.tsx
+++ b/src/app/LoadingScreen.tsx
@@ -1,4 +1,4 @@
-import { CircularProgress, Typography, useTheme } from "@mui/material";
+import { Box, CircularProgress, Typography, useTheme } from "@mui/material";
interface Props {
message?: string;
@@ -9,7 +9,7 @@ export default function LoadingScreen(props: Props) {
const theme = useTheme();
return (
- <>
+
{message ? message : "Loading..."}
- >
+
);
}
\ No newline at end of file
diff --git a/src/common/ResponsiveTable.tsx b/src/common/ResponsiveTable.tsx
index debe1fa..246e98d 100644
--- a/src/common/ResponsiveTable.tsx
+++ b/src/common/ResponsiveTable.tsx
@@ -22,6 +22,10 @@ const useStyles = makeStyles((theme: Theme) => {
title: {
padding: theme.spacing(1)
},
+ subtitle: {
+ padding: theme.spacing(1),
+ marginTop: theme.spacing(-2),
+ },
titleContainer: {
border: "none",
},
@@ -51,6 +55,7 @@ interface Props {
rows: T[],
columns?: Column[],
title?: string | JSX.Element;
+ subtitle?: string | JSX.Element;
total: number,
pageSize: number,
page: number,
@@ -75,6 +80,7 @@ export default function ResponsiveTable(props: Props) {
setPage,
handleRowsPerPageChange,
title,
+ subtitle,
renderGutter,
setSearchText,
isLoading,
@@ -177,6 +183,20 @@ export default function ResponsiveTable(props: Props) {
return null
}
+ const renderSubtitle = () => {
+ if (typeof(subtitle) === "string" ) return (
+
+ {subtitle}
+
+ )
+ if (subtitle) return (
+
+ {subtitle} haha lol
+
+ )
+ return null
+ }
+
function capitalize(val: any) {
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
}
@@ -231,6 +251,7 @@ export default function ResponsiveTable(props: Props) {
{renderTitle()}
+ {renderSubtitle()}
{setSearchText && searchBar()}
{rows.map((row, index) => {
@@ -290,15 +311,10 @@ export default function ResponsiveTable(props: Props) {
- {typeof(title) === "string" ?
-
- {title}
-
- :
- title &&
- {title}
+
+ {renderTitle()}
+ {renderSubtitle()}
- }
{setSearchText &&
@@ -308,7 +324,7 @@ export default function ResponsiveTable(props: Props) {
- { !hideKeys &&
+
{ renderGutter && }
{ columns ?
columns.map((column, index) => {
@@ -327,7 +343,7 @@ export default function ResponsiveTable(props: Props) {
)
})
}
- }
+
{ isLoading ?
diff --git a/src/navigation/Router.tsx b/src/navigation/Router.tsx
index 2407c0c..d4b7849 100644
--- a/src/navigation/Router.tsx
+++ b/src/navigation/Router.tsx
@@ -8,6 +8,7 @@ import SideNavigator from "./SideNavigator";
import Users from "pages/Users";
import { useMobile } from "hooks";
import BottomNavigator from "./BottomNavigator";
+import TeamPage from "pages/Team";
interface Props {
open: boolean,
@@ -52,10 +53,12 @@ export default function Router(props: Props) {
{/* Redirects */}
} />
+ } />
{/* Page routes */}
} />
+ } />
} />
{/* ({
interface Props extends PropsWithChildren{
fullViewport?: boolean;
isCenterCenter?: boolean;
+ sx?: SxProps;
}
export const PageContainer: React.FunctionComponent = props => {
const classes = useStyles();
- const { children, fullViewport, isCenterCenter } = props;
+ const { children, fullViewport, isCenterCenter, sx } = props;
// let fullViewport = false
// let isCenterCenter = false
return (
@@ -50,6 +51,7 @@ export const PageContainer: React.FunctionComponent = props => {
fullViewport ? classes.fullViewportContainer : classes.pageContainer,
isCenterCenter && classes.centerCenter
)}
+ sx={sx}
disableGutters
maxWidth={false}
children={{children}}
diff --git a/src/teams/TeamList.tsx b/src/teams/TeamList.tsx
index 3356087..50a6b7a 100644
--- a/src/teams/TeamList.tsx
+++ b/src/teams/TeamList.tsx
@@ -11,7 +11,7 @@ import {
IconButton,
} from "@mui/material";
import { pond } from "protobuf-ts/pond";
-import { useGlobalState, useTeamAPI, useUserAPI } from "providers";
+import { useGlobalState, useSnackbar, useTeamAPI, useUserAPI } from "providers";
import { Team, teamScope } from "models";
import { useNavigate } from "react-router";
import { cloneDeep } from "lodash";
@@ -57,6 +57,7 @@ export default function TeamList() {
const userAPI = useUserAPI();
const history = useNavigate();
const isMobile = useMobile()
+ const snackbar = useSnackbar();
const [{ user, as }] = useGlobalState();
const [teamPerms, setTeamPerms] = useState