Commit 66d1236f authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

show name in title in profile page

parent 81075e21
......@@ -8,6 +8,7 @@ import {
} from "@mui/material";
import React, { useContext } from "react";
import { UserContext } from "./_app";
import Head from "next/head";
export default function Profile() {
const user = useContext(UserContext);
......@@ -17,13 +18,20 @@ export default function Profile() {
return (
<>
{user.value?.token ? (
<>
<Head>
<title>{`${user.value.name} | OpenShop`}</title>
</Head>
<Box>
<Paper sx={{ p: 3, boxShadow: "none" }}>
<div className="gap-10 mx-auto text-left grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 max-w-[1520px]">
<div className="mx-auto">
<img
className="inline-block w-[200px] h-[200px] sm:w-[300px] sm:h-[300px] rounded-lg object-cover"
src={user.value.photo.length ? user.value.photo : "empty.jpg"}
src={
user.value.photo.length ? user.value.photo : "empty.jpg"
}
alt=""
/>
</div>
......@@ -60,6 +68,7 @@ export default function Profile() {
</div>
</Paper>
</Box>
</>
) : (
<Box>
<Paper sx={{ p: 3, textAlign: "center" }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment