Browse Source

hide default title

master
azri 1 week ago
parent
commit
1ae548394d
2 changed files with 6 additions and 4 deletions
  1. 3
    1
      src/components/SideCart/SideCart.jsx
  2. 3
    3
      src/pages/Cart.jsx

+ 3
- 1
src/components/SideCart/SideCart.jsx View File

117
                         }}>
117
                         }}>
118
                           {product?.title}
118
                           {product?.title}
119
                         </Typography>
119
                         </Typography>
120
+                        
121
+                        {(title != "Default Title") && 
120
                         <Typography variant="body2" sx={{
122
                         <Typography variant="body2" sx={{
121
                           fontWeight: "100", fontSize: {
123
                           fontWeight: "100", fontSize: {
122
                             xs: "0.875rem",
124
                             xs: "0.875rem",
123
                             sm: "0.875rem",
125
                             sm: "0.875rem",
124
                             md: "1.1rem",
126
                             md: "1.1rem",
125
                           }
127
                           }
126
-                        }}>{`VARIANT: ${title}`}</Typography>
128
+                        }}>{`VARIANT: ${title}`}</Typography>}
127
 
129
 
128
                         <Box sx={{ display: "flex", alignItems: "center" }}>
130
                         <Box sx={{ display: "flex", alignItems: "center" }}>
129
 
131
 

+ 3
- 3
src/pages/Cart.jsx View File

136
                     </TableCell>
136
                     </TableCell>
137
 
137
 
138
                     <TableCell>
138
                     <TableCell>
139
-                      <Typography variant='body2' sx={{ fontWeight: "bold", mb: 1 }}>{product.title}</Typography>
139
+                      <Typography variant='body2' sx={{ fontWeight: "bold", mb: 1 }}>{(product.title == "Default Title") ? "" : product.title} </Typography>
140
 
140
 
141
-                      {product?.collections?.nodes?.map(({ title }) => (<Typography variant='body2'>{title}</Typography>))}
141
+                      {product?.collections?.nodes?.map(({ title }) => (<Typography variant='body2'>{ (title == "Default Title") ? "" : title}</Typography>))}
142
 
142
 
143
                     </TableCell>
143
                     </TableCell>
144
 
144
 
145
                     <TableCell align='center'>
145
                     <TableCell align='center'>
146
-                      <Typography variant='body2' sx={{ fontWeight: "bold" }} >{title}</Typography>
146
+                      <Typography variant='body2' sx={{ fontWeight: "bold" }} >{ (title == "Default Title") ? "" : title}</Typography>
147
                     </TableCell>
147
                     </TableCell>
148
 
148
 
149
                     <TableCell align='center'>
149
                     <TableCell align='center'>

Loading…
Cancel
Save