Skip to content

Commit

Permalink
Capitalized DVD
Browse files Browse the repository at this point in the history
  • Loading branch information
marwanehab98 committed Jan 12, 2023
1 parent 1468eaf commit 1cc08b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Product/Product.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Card from 'react-bootstrap/Card';
// import { ToggleButton } from 'react-bootstrap';
import { useState, useEffect } from 'react';

function Product(props) {
Expand All @@ -19,7 +18,7 @@ function Product(props) {
case 'size':
return value + "MB"
case 'type':
if (key === 'dvd') return value.toUpperCase()
if (value === 'dvd') return value.toUpperCase()
else return value.replace(/^\w/, c => c.toUpperCase())
default:
return value
Expand Down

2 comments on commit 1cc08b4

@vercel
Copy link

@vercel vercel bot commented on 1cc08b4 Jan 12, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 1cc08b4 Jan 12, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.