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

explore

parent 9e612528
No related branches found
No related tags found
1 merge request!60explore
Pipeline #40265 passed
import { BackHeader } from "@/components/back-header"
import { GlobalLayout } from "@/components/global-layout"
import { Connect } from "@/components/profile/components/connect"
import { Trends } from "@/components/trends/components/trends"
import { Card } from "@/components/ui/card"
import { Separator } from "@/components/ui/separator"
import { getCurrentUser } from "@/lib/session"
export default async function PeoplePage() {
const session = await getCurrentUser()
return (
<GlobalLayout
mainContent={
<Card className="w-full overflow-hidden p-6 md:p-12">
<Trends min={0} max={5} />
<Separator className="my-6 p-0.5" />
<Connect session={session} min={0} max={5} />
</Card>
}
/>
)
}
\ No newline at end of file
......@@ -15,45 +15,51 @@ export default function HelpPage() {
<p className="font-bold">1. How do I create an account?</p>
<p>
To create an account, click on the &quot;Sign Up&quot; button on the homepage.
Fill in the required information and follow the prompts to complete the registration process.
Fill in the required information and follow the prompts to complete the registration process, but you will have to verify you email to Login.
</p>
<p className="font-bold pt-6">2. How can I create a new post?</p>
<p className="font-bold pt-6">2. How do I verify my Email?</p>
<p>
To create a new post, you have multiple options depending on where you are on the website.
If you&apos;re on the homepage, or your profile page, you&apos;ll find a text field where you can write your post.
After you &quot;Sign Up&quot; and create a Account, we will send you a Email.
Click on the Link that is Provided to Verify your Account (Note: You Have to Verify your Email within 24h).
</p>
<p className="font-bold pt-6">3. How can I create a new post?</p>
<p>
To create a new post, you have to go to the Homepage, at the Top you&apos;ll find a Text field where you can write your post or upload Images and Clips.
Once you&apos;re done, simply click the &quot;Post&quot; button to publish your content and share it with others.
</p>
<p className="font-bold pt-6">3. How can I delete my post?</p>
<p className="font-bold pt-6">4. How can I edit or delete my post?</p>
<p>
To delete your post, go to the Home page or your profile page and locate your post.
Depending on the platform, there may be options to delete the post.
Click on the respective option and follow the prompts to make the desired changes.
To edit or delete your post, go to the Homepage or your profile page and locate your post.
Depending on the platform, there may be options to edit or delete the post.
Click on three dots, where you will see the option Delete, an edit option is currently not provided we are working on it.
</p>
<p className="font-bold pt-6">4. How do I follow a user?</p>
<p className="font-bold pt-6">5. How do I Search and follow a User?</p>
<p>
To follow a user, visit their profile page and look for the &quot;Follow&quot; button.
Click on it, and you&apos;ll start receiving updates and notifications from them.
To Search a User, go to the Homepage where you find a Search bar and type in the Name of the User you try to find.
To Follow a User visit their profile page and look for the &quot;Follow&quot; button, click on it, to &quot;Follow&quot; and a second time to &quot;Unfollow&quot;.
</p>
<p className="font-bold pt-6">5. How do I customize my profile?</p>
<p className="font-bold pt-6">6. How do I Search Games and add them to my List?</p>
<p>
To customize your profile, go to the settings of your account.
There, you can upload a profile picture, add a bio, update your personal information, and adjust privacy settings according to your preferences.
To Search a Game, go to the Games-Page where you find a Search bar and type in the Name of the Game you try to find.
To Add the Game to your list visit the Game page and look for &quot;Status&quot;, click on it, you will see all list you have and add the game to the list you want to.
To add the Game to your favorites you will find a button under &quot;Status&quot;.
</p>
<p className="font-bold pt-6">6. Can I change my username?</p>
<p className="font-bold pt-6">7. How do I customize my profile?</p>
<p>
In most cases, you can change your username by going to the account settings.
Look for the option to edit your name and follow the provided instructions to make the change.
To customize your profile, go to the settings of your account.
There, you can upload a profile picture, add a bio, update your personal information, and adjust privacy settings according to your preferences.
</p>
<p className="font-bold pt-6">7. How do I delete my account?</p>
<p className="font-bold pt-6">8. Can I change my username?</p>
<p>
If you wish to delete your account, go to the account settings “Account Settings” section and look for the option to delete your account.
Follow the provided steps and confirm your decision to permanently delete your account. Please note that this action is irreversible and will result in the loss of all associated data.
In most cases, you can change your username by going to the Settings.
Look for the option to edit your name and follow the provided instructions to make the change.
</p>
</CardContent>
<CardFooter className="flex flex-wrap items-center justify-between pt-6">
......
......@@ -26,6 +26,7 @@ import {
Moon,
MoreHorizontal,
Repeat2,
Rocket,
Settings,
SunMedium,
SwitchCamera,
......@@ -92,6 +93,7 @@ export const Icons = {
menu: Menu, // Mobile Menu Icon
media: Image, // Media Gweet Icon
filter: Filter, // Filter Games Icon
rocket: Rocket, // Explore Icon
warning: AlertTriangle,
arrowRight: ArrowRight,
laptop: Laptop,
......
......@@ -14,7 +14,7 @@ export const MobileNav = ({ items, user }: { items: SidebarNavItem[], user: User
return null
}
const visibleItems = user ? items : items.slice(0, 2)
const visibleItems = user ? items : items.slice(0, 3)
return (
<nav className={`container flex flex-row items-center h-full w-full max-w-lg justify-between mx-auto`}>
......
......@@ -17,7 +17,7 @@ export const Sidebar = ({ items, user }: { items: SidebarNavItem[], user: User |
return null
}
const visibleItems = user ? items : items.slice(0, 2)
const visibleItems = user ? items : items.slice(0, 3)
return (
<nav className="grid items-start gap-2">
......
......@@ -8,9 +8,12 @@ import Link from "next/link"
import { useUsers } from "../hooks/use-users"
import { UserItem } from "./user-item"
export const Connect = ({ title = "Who to follow", session }: { title?: string, session: User | undefined }) => {
export const Connect = ({ title = "Who to follow", session, min, max }: { title?: string, session: User | undefined, min?: number, max?: number }) => {
const { data: people, isLoading, isError, isSuccess } = useUsers()
min = !min ? title ? 0 : undefined : min
max = !max ? title ? 3 : undefined : max
return (
<div className="space-y-5 flex flex-col">
{title && <h1 className="font-bold p-1">{title}</h1>}
......@@ -23,7 +26,7 @@ export const Connect = ({ title = "Who to follow", session }: { title?: string,
<h1 className="text-center">{"Empty :("}</h1>
</Card>
) : isSuccess &&
people?.slice(title ? 0 : undefined, title ? 3 : undefined).map((person) => {
people?.slice(min, max).map((person) => {
return <UserItem
key={person?.id}
user={person}
......
......@@ -7,9 +7,12 @@ import Link from "next/link"
import { useHashtags } from "../hooks/use-hashtags"
import { Trend } from "./trend"
export const Trends = ({ title = "Trends" }: { title?: string }) => {
export const Trends = ({ title = "Trends", min, max }: { title?: string, min?: number, max?: number }) => {
const { data: hashtags, isLoading, isError, isSuccess } = useHashtags()
min = !min ? title ? 0 : undefined : min
max = !max ? title ? 3 : undefined : max
return (
<div className="space-y-5 flex flex-col">
{title && <h1 className="font-bold p-1">{title}</h1>}
......@@ -22,7 +25,7 @@ export const Trends = ({ title = "Trends" }: { title?: string }) => {
<h1 className="text-center">No trends yet</h1>
</Card>
) : isSuccess &&
hashtags?.slice(title ? 0 : undefined, title ? 3 : undefined).map((hashtag, index) => {
hashtags?.slice(min, max).map((hashtag, index) => {
return (
<Trend
key={hashtag.id}
......
......@@ -27,6 +27,11 @@ export const dashboardConfig: DashboardConfig = {
// href: "/followers",
// icon: "users",
// },
{
title: "Explore",
href: "/explore",
icon: "rocket",
},
{
title: "My Profile",
href: "",
......
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