Skip to content

Commit

Permalink
nextjs 13
Browse files Browse the repository at this point in the history
  • Loading branch information
jdgamble555 committed Nov 11, 2022
1 parent 05e70e3 commit 6ec84ad
Show file tree
Hide file tree
Showing 7 changed files with 986 additions and 997 deletions.
4 changes: 1 addition & 3 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export default function Navbar(): JSX.Element {
<li>
{user?.photoURL && (
<Link passHref href={`/${username}`}>
<a>
<Img src={user?.photoURL} width="50px" height="50px" />
</a>
<Img alt={user?.displayName} src={user?.photoURL} width="50" height="50" />
</Link>
)}
</li>
Expand Down
4 changes: 2 additions & 2 deletions components/PostContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export default function PostContent({ post }: { post: any }) {
<h1>{post?.title}</h1>
<span className="text-sm">
Written by{' '}
<Link href={`/${post.username}/`}>
<a className="text-info">@{post.username}</a>
<Link className="text-info" href={`/${post.username}/`}>
@{post.username}
</Link>{' '}
on {createdAt.toISOString()}
</span>
Expand Down
8 changes: 3 additions & 5 deletions components/PostFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ function PostItem({ post, admin }: { post: any, admin: boolean }) {

return (
<div className="card">
<Link href={`/${post.username}`}>
<a>
<strong>By @{post.username}</strong>
</a>
<Link passHref href={`/${post.username}`}>
<strong>By @{post.username}</strong>
</Link>

<Link passHref href={`/${post.username}/${post.slug}`}>
<h2>
<a>{post.title}</a>
{post.title}
</h2>
</Link>

Expand Down
2 changes: 1 addition & 1 deletion components/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Img from 'next/image';
export default function UserProfile({ user }: { user: any }) {
return (
<div className="box-center">
<Img src={user.photoURL || '/hacker.png'} width={150} height={150} objectFit="cover" className="card-img-center" />
<Img alt={user.displayName} src={user.photoURL || '/hacker.png'} width={150} height={150} objectFit="cover" className="card-img-center" />
<p>
<i>@{user.username}</i>
</p>
Expand Down
Loading

0 comments on commit 6ec84ad

Please sign in to comment.