Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
project_ss23_gameunity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Yusuf Akgül
project_ss23_gameunity
Commits
5a2b3e29
Commit
5a2b3e29
authored
1 year ago
by
Yusuf Akgül
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of gitlab.bht-berlin.de:s86116/project_ss23 into swaggerDocWithChanges
parents
b2f929fc
1e04ab8f
No related branches found
Branches containing commit
No related tags found
1 merge request
!43
docs
Pipeline
#39800
passed
1 year ago
Stage: build
Stage: test
Changes
23
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/profile/components/user-item.tsx
+41
-0
41 additions, 0 deletions
components/profile/components/user-item.tsx
components/trends/components/trend.tsx
+2
-2
2 additions, 2 deletions
components/trends/components/trend.tsx
lib/swagger.ts
+4
-4
4 additions, 4 deletions
lib/swagger.ts
with
47 additions
and
6 deletions
components/profile/components/user-item.tsx
0 → 100644
+
41
−
0
View file @
5a2b3e29
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
>
</
p
>
}
</
div
>
</
Link
>
)
}
This diff is collapsed.
Click to expand it.
components/trends/components/trend.tsx
+
2
−
2
View file @
5a2b3e29
...
...
@@ -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
>
...
...
This diff is collapsed.
Click to expand it.
lib/swagger.ts
+
4
−
4
View file @
5a2b3e29
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
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment