Skip to content

Commit

Permalink
run the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Bechthold committed Jan 25, 2024
1 parent 12a395d commit fa3e8ff
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 79 deletions.
72 changes: 31 additions & 41 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,48 +35,38 @@ const App = (): React.ReactElement => {

return (
<ChakraProvider theme={customTheme}>
<AuthContext.Provider
value={{ authenticatedUser, setAuthenticatedUser }}
>
<Router>
<Switch>
<Route exact path={Routes.LOGIN_PAGE} component={LoginPage} />
<Route exact path={Routes.SIGNUP_PAGE} component={SignupPage} />
<PrivateRoute
exact
path={Routes.VERIFICATION_PAGE}
component={Verification}
/>
<PrivateRoute
exact
path={Routes.HOME_PAGE}
component={HomePage}
/>
<PrivateRoute
exact
path={Routes.RESIDENT_DIRECTORY_PAGE}
component={ResidentDirectory}
/>
<PrivateRoute
exact
path={Routes.EMPLOYEE_DIRECTORY_PAGE}
component={EmployeeDirectoryPage}
/>
<PrivateRoute
exact
path={Routes.SIGN_IN_LOGS_PAGE}
component={SignInLogsPage}
/>
<PrivateRoute
exact
path={Routes.TAGS_PAGE}
component={TagsPage}
/>
<AuthContext.Provider value={{ authenticatedUser, setAuthenticatedUser }}>
<Router>
<Switch>
<Route exact path={Routes.LOGIN_PAGE} component={LoginPage} />
<Route exact path={Routes.SIGNUP_PAGE} component={SignupPage} />
<PrivateRoute
exact
path={Routes.VERIFICATION_PAGE}
component={Verification}
/>
<PrivateRoute exact path={Routes.HOME_PAGE} component={HomePage} />
<PrivateRoute
exact
path={Routes.RESIDENT_DIRECTORY_PAGE}
component={ResidentDirectory}
/>
<PrivateRoute
exact
path={Routes.EMPLOYEE_DIRECTORY_PAGE}
component={EmployeeDirectoryPage}
/>
<PrivateRoute
exact
path={Routes.SIGN_IN_LOGS_PAGE}
component={SignInLogsPage}
/>
<PrivateRoute exact path={Routes.TAGS_PAGE} component={TagsPage} />

<Route exact path="*" component={NotFound} />
</Switch>
</Router>
</AuthContext.Provider>
<Route exact path="*" component={NotFound} />
</Switch>
</Router>
</AuthContext.Provider>
</ChakraProvider>
);
};
Expand Down
67 changes: 32 additions & 35 deletions frontend/src/components/pages/Errors/NotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,39 @@ const Login = (): React.ReactElement => {
const history = useHistory();

const onHomeClick = () => {
history.push(HOME_PAGE)
}
history.push(HOME_PAGE);
};

return (
<Flex h="100vh">
<Box w="47%">
<Flex
h="100%"
direction="column"
justifyContent="center"
alignItems="center"
gap="28px"
>
<Box w="80%" textAlign="left">
<Text variant="login">Page Not Found</Text>
</Box>
<Box w="80%" textAlign="left">
<Text variant="loginSecondary">
The page you are looking for does not exist.
</Text>
</Box>
<Box w="80%">
<Button
variant="login"
onClick={onHomeClick}
>
Back To Home
</Button>
</Box>
</Flex>
</Box>
<Box flex="1" bg="teal.400">
{/* Background */}
</Box>
</Flex>
);
return (
<Flex h="100vh">
<Box w="47%">
<Flex
h="100%"
direction="column"
justifyContent="center"
alignItems="center"
gap="28px"
>
<Box w="80%" textAlign="left">
<Text variant="login">Page Not Found</Text>
</Box>
<Box w="80%" textAlign="left">
<Text variant="loginSecondary">
The page you are looking for does not exist.
</Text>
</Box>
<Box w="80%">
<Button variant="login" onClick={onHomeClick}>
Back To Home
</Button>
</Box>
</Flex>
</Box>
<Box flex="1" bg="teal.400">
{/* Background */}
</Box>
</Flex>
);
};

export default Login;
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ const ResidentDirectory = (): React.ReactElement => {
<Flex marginBottom="16px" justify="space-between">
<Box textStyle="hero-table">Resident Directory</Box>
<Spacer />
{authenticatedUser?.role === UserRole.ADMIN &&
{authenticatedUser?.role === UserRole.ADMIN && (
<CreateResident
getRecords={getResidents}
setUserPageNum={setUserPageNum}
countResidents={countResidents}
/>
}
)}
</Flex>

<ResidentDirectoryFilters
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/helper/csvHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ const convertLogsToCSV = (data: LogRecord[]): boolean => {
}
};

export default convertLogsToCSV
export default convertLogsToCSV;

0 comments on commit fa3e8ff

Please sign in to comment.