Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Update Falback component to accept ovelStart and enlarge the maxWid… #1248

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Client/src/Components/Fallback/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import "./index.css";
* @returns {JSX.Element} The rendered fallback UI.
*/

const Fallback = ({ title, checks, link = "/", isAdmin }) => {
const Fallback = ({ title, checks, link = "/", isAdmin, ovalStart }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Shemy, why is the name of this variable ovalStart?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could provid a fallback for that variable, since this component is already being called. You can set ovalStart = false in the destructuring (I suggest changing for a more semantic name for the variable)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shemy-gan was this meant to be vowelStart? That makes sense? In the interest of expediencey I'll push that change to the branch, we can revisit if there was a special meaning for ovalStart

const theme = useTheme();
const navigate = useNavigate();
const mode = useSelector((state) => state.ui.mode);
Expand Down Expand Up @@ -48,15 +48,15 @@ const Fallback = ({ title, checks, link = "/", isAdmin }) => {
</Box>
<Stack
gap={theme.spacing(4)}
maxWidth={"275px"}
maxWidth={"300px"}
zIndex={1}
>
<Typography
component="h1"
marginY={theme.spacing(4)}
color={theme.palette.text.tertiary}
>
A {title} is used to:
{ovalStart ? "An" : "A"} {title} is used to:
</Typography>
{checks.map((check, index) => (
<Check
Expand Down
Loading