Skip to content

Commit

Permalink
change the design
Browse files Browse the repository at this point in the history
  • Loading branch information
Herman-Riah19 committed Nov 17, 2023
1 parent f4a56aa commit 49f036e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion app/Controllers/Http/UsersController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class UsersController {

await user?.merge({ password: password}).save()

await auth.login(user)
await auth.login(user!)

session.flash('success', `Welcome back, ${auth.user!.username}!`)
return response.redirect('/')
Expand Down
36 changes: 18 additions & 18 deletions resources/js/Components/Card/CardProductShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ const CardProductShow = ({ artiste, avatar, categorieName, product, liked }) =>
{product.name}
</Typography>
</Grid>
<Grid item xs={6}>
</Grid>
<Typography variant="p" color="text.thirdy">
{product.description}
</Typography>
</CardContent>
<CardActions>
<Grid container>
<Grid item xs={4}>
<Stack
direction="row"
spacing={2}
Expand All @@ -60,29 +67,22 @@ const CardProductShow = ({ artiste, avatar, categorieName, product, liked }) =>
<Button
variant="outlined"
color="warning"
startIcon={liked ? <Favorite /> : <FavoriteBorderOutlined/>}
startIcon={liked ? <Favorite /> : <FavoriteBorderOutlined />}
>
{product.nomber_like}
</Button>
</Link>
<Button
variant="outlined"
color="secondary"
startIcon={<Comment />}
>
{product.nomber_comment}
</Button>
<Button
variant="outlined"
color="secondary"
startIcon={<Comment />}
>
{product.nomber_comment}
</Button>
</Stack>
</Grid>
</Grid>
<Typography variant="p" color="text.thirdy">
{product.description}
</Typography>
</CardContent>
<CardActions>
<Grid container>
<Grid item>
<Link href={`/categorie/${categorieName}`}>
<Grid item xs={4}>
<Link href={`/categorie/${categorieName}`}>
<Typography
variant="body1"
color="secondary"
Expand Down
44 changes: 22 additions & 22 deletions resources/js/Pages/Product/ProductShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,45 +101,45 @@ const ProductShow = ({
image={`${assetUrl}/${artist.username}/${product.asset}`}
alt={product.name}/>
</Card>
</Grid>
<Grid item xs={12} sm={5} md={5}>
<Paper>
<CardProductShow
artiste={artist}
liked={liked}
avatar={`${avatarUrl}/${profile.avatar}`}
categorieName={categorie.name}
product={product}
assetUrl={avatarUrl}
/>

<Accordion>
<AccordionSummary sx={{color:'white'}} expandIcon={<ExpandMore/>}>
<Accordion sx={{mt: '25px'}}>
<AccordionSummary sx={{ color: 'white' }} expandIcon={<ExpandMore />}>
<Paper
component="form"
sx={{ p: '2px 4px', display: 'flex', alignItems: 'center', width: '100%' }}
method='post'
method='post'
>
<InputBase
id="body"
name="body"
value={data.body}
onChange={handleChange}
onChange={handleChange}
error={errors?.body}
helperText={errors?.body && errors?.body}
sx={{ ml: 1, flex: 1, width: "100%" }}
placeholder="Add Comment"
inputProps={{ 'aria-label': 'Add comment' }}
multiline
/>
<IconButton type="submit" sx={{ p: '10px', color:'white'}} onClick={handleComment}>
<IconButton type="submit" sx={{ p: '10px', color: 'white' }} onClick={handleComment}>
<Comment />
</IconButton>
</Paper>
</AccordionSummary>
<AccordionDetails>
<CardComment id={`${product.id}`} users={users} comments={comments} profileComments={profileComments} assetUrl={avatarUrl}/>
</AccordionDetails>
</Accordion>
</AccordionSummary>
<AccordionDetails>
<CardComment id={`${product.id}`} users={users} comments={comments} profileComments={profileComments} assetUrl={avatarUrl} />
</AccordionDetails>
</Accordion>
</Grid>
<Grid item xs={12} sm={5} md={5}>
<Paper>
<CardProductShow
artiste={artist}
liked={liked}
avatar={`${avatarUrl}/${profile.avatar}`}
categorieName={categorie.name}
product={product}
assetUrl={avatarUrl}
/>
</Paper>
</Grid>
</Grid>
Expand Down

0 comments on commit 49f036e

Please sign in to comment.