-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #293 from UKHomeOffice/DRTII-696-Duplicated-non-de…
…scriptive-page-titles Drtii 696 duplicated non descriptive page titles
- Loading branch information
Showing
32 changed files
with
1,140 additions
and
970 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
import React from 'react'; | ||
import React from 'react' | ||
|
||
import AccessRequestForm from "./AccessRequestForm"; | ||
import {PortList} from "./PortList"; | ||
import {Box} from "@mui/material"; | ||
import {UserProfile} from "../model/User"; | ||
import {ConfigValues} from "../model/Config"; | ||
import AccessRequestForm from "./AccessRequestForm" | ||
import {PortList} from "./PortList" | ||
import {Box} from "@mui/material" | ||
import {UserProfile} from "../model/User" | ||
import {ConfigValues} from "../model/Config" | ||
import {Helmet} from "react-helmet"; | ||
|
||
|
||
interface IProps { | ||
user: UserProfile; | ||
config: ConfigValues; | ||
user: UserProfile | ||
config: ConfigValues | ||
} | ||
|
||
|
||
export const Home = (props: IProps) => { | ||
const isRccUser = () => { | ||
return props.user.roles.includes("rcc:central") || props.user.roles.includes("rcc:heathrow") || props.user.roles.includes("rcc:north") || props.user.roles.includes("rcc:south") | ||
} | ||
const isRccUser = () => { | ||
return props.user.roles.includes("rcc:central") || props.user.roles.includes("rcc:heathrow") || props.user.roles.includes("rcc:north") || props.user.roles.includes("rcc:south") | ||
} | ||
|
||
return <Box className="App-header"> | ||
{props.user.ports.length === 0 && !isRccUser() ? | ||
<AccessRequestForm regions={props.config.portsByRegion} teamEmail={props.config.teamEmail}/> : | ||
<PortList user={props.user} allRegions={props.config.portsByRegion} userPorts={props.user.ports} | ||
drtDomain={props.config.domain} isRccUser={isRccUser()}/> | ||
} | ||
return <> | ||
<Helmet> | ||
<title>DRT</title> | ||
</Helmet> | ||
<Box className="App-header"> | ||
{props.user.ports.length === 0 && !isRccUser() ? | ||
<AccessRequestForm regions={props.config.portsByRegion} teamEmail={props.config.teamEmail}/> : | ||
<PortList user={props.user} allRegions={props.config.portsByRegion} userPorts={props.user.ports} | ||
drtDomain={props.config.domain} isRccUser={isRccUser()}/> | ||
} | ||
</Box> | ||
</> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.