<commit_before>import React from "react"
import Typography from "@material-ui/core/Typography"
import AvailableDisplay from "./AvailableDisplay"
import { CartItem } from "common/types"

type Props = {
  cartData: CartItem
  inStock: boolean
}

const Availability = ({ cartData, inStock }: Props) => (
  <React.Fragment>
    {inStock ? (
      <AvailableDisplay cartData={cartData} />
    ) : (
      <Typography variant="body2" color="error">
        Currently unavailable at the DSC
      </Typography>
    )}
  </React.Fragment>
)

export default Availability
<commit_msg>feat: use alert component for unavailable status<commit_after>import React from "react"
import { makeStyles } from "@material-ui/core/styles"
import Alert from "@material-ui/lab/Alert"
import AvailableDisplay from "./AvailableDisplay"
import { CartItem } from "common/types"

const useStyles = makeStyles((theme) => ({
  message: {
    padding: "0px",
  },
}))

type Props = {
  cartData: CartItem
  inStock: boolean
}

/**
 * Availability handles the display to indicate a stock's current
 * inventory status.
 */

const Availability = ({ cartData, inStock }: Props) => {
  const classes = useStyles()

  return (
    <React.Fragment>
      {inStock ? (
        <AvailableDisplay cartData={cartData} />
      ) : (
        <Alert
          classes={{ message: classes.message }}
          icon={false}
          severity="error">
          Currently unavailable at the DSC
        </Alert>
      )}
    </React.Fragment>
  )
}
export default Availability

{'fraction_non_alphanumeric': 0.12091503267973856, 'fraction_numerical': 0.00130718954248366, 'mean_word_length': 3.149051490514905, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4621596', 'n_tokens_mistral': 454, 'n_tokens_neox': 448, 'n_words': 122}