Skip to content

Commit

Permalink
code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-at-mit committed Jan 14, 2025
1 parent 1a709bf commit 6fbd032
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
useMetaIntegratedSystemsList,
useMetaProductsList,
} from "@/services/ecommerce/meta/hooks";
import { styled } from "@mitodl/smoot-design";
import { Typography, Button } from "@mui/material";
import { styled, Button } from "@mitodl/smoot-design";
import { Typography } from "@mui/material";
import Container from "@mui/material/Container";
import { getCurrentSystem } from "@/utils/system";
import { Card } from "@/components/Card/Card";
Expand Down Expand Up @@ -56,25 +56,23 @@ const SelectSystem: React.FC = () => {
};

return (
<>
<SelectSystemContainer>
{systems.isFetched && systems.data ? (
<>
<label htmlFor="system">Select a system:</label>
<select name="system" id="system" onChange={hndSystemChange}>
<option value="">Select a system</option>
{systems.data.results.map((system: IntegratedSystem) => (
<option key={system.id} value={system.slug || ""}>
{system.name}
</option>
))}
</select>
</>
) : (
<p>Loading systems...</p>
)}
</SelectSystemContainer>
</>
<SelectSystemContainer>
{systems.isFetched && systems.data ? (
<>
<label htmlFor="system">Select a system:</label>
<select name="system" id="system" onChange={hndSystemChange}>
<option value="">Select a system</option>
{systems.data.results.map((system: IntegratedSystem) => (
<option key={system.id} value={system.slug || ""}>
{system.name}
</option>
))}
</select>
</>
) : (
<p>Loading systems...</p>
)}
</SelectSystemContainer>
);
};

Expand Down

0 comments on commit 6fbd032

Please sign in to comment.