Skip to content
Snippets Groups Projects
Commit 5a2b3e29 authored by Yusuf Akgül's avatar Yusuf Akgül :hatching_chick:
Browse files

Merge branch 'main' of gitlab.bht-berlin.de:s86116/project_ss23 into swaggerDocWithChanges

parents b2f929fc 1e04ab8f
No related branches found
No related tags found
1 merge request!43docs
Pipeline #39800 passed
import { FollowButton } from "@/components/follow-button"
import { UserAvatar } from "@/components/user-avatar"
import Link from "next/link"
import { IUser } from "../types"
import { following } from "../utils/following"
export const UserItem = ({ user, sessionId }: { user: IUser, sessionId: string | undefined }) => {
const isFollowing = following({
user,
sessionUserId: sessionId ? sessionId : "",
})
return (
<Link
href={`/${user?.username}`}
className="flex flex-row flex-shrink gap-3 hover:bg-accent active:bg-accent rounded-lg p-3 items-center">
<UserAvatar
user={{ username: user.username, image: user.image || null }}
className="h-12 w-12 aspect-square"
/>
<div className="flex flex-col flex-shrink justify-center h-full w-full space-y-3 overflow-hidden">
<div className="flex justify-between">
<div className="whitespace-nowrap">
<h1 className="font-bold">{user.name}</h1>
<h1 className="text-sm text-sky-500">@{user.username}</h1>
</div>
<FollowButton
userId={user.id}
username={user.username ? user.username : ""}
isFollowing={isFollowing}
/>
</div>
{user.bio ? (<p className="truncate w-full">{user.bio}</p>) : <p>&nbsp;</p>}
</div>
</Link>
)
}
......@@ -7,12 +7,12 @@ export const Trend = ({ ranking = 1, title, gweets = 1 }: iTrendProps) => {
return (
<Link
href={`/search?query=${title.toLowerCase()}`}
className="flex flex-col justify-between hover:bg-accent active:bg-accent rounded-lg p-1">
className="flex flex-col justify-between hover:bg-accent active:bg-accent rounded-lg p-1 overflow-hidden">
<div className="text-xs text-muted-foreground">
{ranking} · Trending
</div>
<div>#{title}</div>
<div className="truncate">#{title}</div>
<div className="text-xs text-muted-foreground">
{gweets} {gweets === 1 ? "gweet" : "gweets"}
</div>
......
import { createSwaggerSpec } from 'next-swagger-doc';
import { createSwaggerSpec } from 'next-swagger-doc'
export const getApiDocs = async () => {
const spec = createSwaggerSpec({
......@@ -20,6 +20,6 @@ export const getApiDocs = async () => {
},
security: [],
},
});
return spec;
};
})
return spec
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment