Skip to content

Commit

Permalink
Fix width and height issues
Browse files Browse the repository at this point in the history
Fixed the width and height issues of
capella and default views
  • Loading branch information
bharath-gp committed Jun 4, 2024
1 parent 62042e0 commit eb944b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion client/src/components/main/DefaultMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from "react";

const DefaultMain: React.FC = () => {
return (
<Box component="main" sx={{ flexGrow: 1}}>
<Box component="main" sx={{ width: "80%" }}>
<Box sx={{
height: '20%', /* Chart takes up 30% of the height */
width: '100%',
Expand Down
6 changes: 4 additions & 2 deletions client/src/components/main/MainSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {useAppContext} from "../../context/context.tsx";
import SiderComponent from "../sidebar/SideBar.tsx";
import CapellaMain from "./CapellaMain.tsx";
import DefaultMain from "./DefaultMain.tsx";
import {Stack} from "@mui/material";
import {Box, Stack} from "@mui/material";
import React from "react";

const MainSection: React.FC = () => {
Expand All @@ -14,7 +14,9 @@ const MainSection: React.FC = () => {
<SiderComponent/>
{
product === "capella"? (
<CapellaMain />
<Box sx={{ width: '80%'}}>
<CapellaMain />
</Box>
) : (
<DefaultMain />
)
Expand Down
12 changes: 5 additions & 7 deletions client/src/components/navbar/AppBar.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { AppBar, Toolbar, Typography, Box } from "@mui/material";
import LeaderboardIcon from '@mui/icons-material/Leaderboard';
import {useState} from "react";
import { ProductMenu } from "./ProductMenu";
import UserMenu from "./UserMenu";
import VersionMenu from "./VersionMenu";
import Styles from "./styles";
import {FilterMenu} from "./FilterMenu";
Expand All @@ -11,14 +9,14 @@ import {useAppContext} from "../../context/context.tsx";
const AppBarComponent: React.FC = () => {
//const [selectedProd, setSelectedProd] = useState(Products.indexOf(localStorage.getItem('scope') || ""));
//const [version, setVersion] = useState<string>(versions[0]);
const [isLoggedIn, setLoggedIn] = useState(false);
const [userName, setUserName] = useState('');
/* const [isLoggedIn, setLoggedIn] = useState(false);
const [userName, setUserName] = useState('');*/
const buildsFilterItems = [5, 10, 25];
const runsFilterItems = [0, 2000, 5000, 10000];
const appContext = useAppContext();
const product = appContext.scope;

const handleLogin = (response: any) => {
/*const handleLogin = (response: any) => {
setLoggedIn(true);
setUserName(response.profileObj.name);
localStorage.setItem("user", response.profileObj.name);
Expand All @@ -28,7 +26,7 @@ const AppBarComponent: React.FC = () => {
setLoggedIn(false);
setUserName('');
localStorage.setItem("user", "");
};
};*/

return (
<AppBar position="absolute" sx={Styles.toolBar} >
Expand All @@ -47,7 +45,7 @@ const AppBarComponent: React.FC = () => {
<FilterMenu title="Runs" items={runsFilterItems} scopeVariable='runFilter' scopeAction='runFilterChanged' />
</>
)}
<UserMenu isLoggedIn={isLoggedIn} userName={userName} handleLogin={handleLogin} handleLogout={handleLogout} />
{/*<UserMenu isLoggedIn={isLoggedIn} userName={userName} handleLogin={handleLogin} handleLogout={handleLogout} />*/}
</Box>
</Toolbar>
</AppBar>
Expand Down

0 comments on commit eb944b1

Please # to comment.