mirror of
https://github.com/Ategon/Jamjar.git
synced 2025-02-12 06:16:21 +00:00
Remove unused vars
This commit is contained in:
parent
d5e07cab45
commit
6289989bce
5 changed files with 35 additions and 53 deletions
src
|
@ -1,8 +1,3 @@
|
||||||
import Posts from "../components/posts";
|
|
||||||
import Timers from "../components/timers";
|
|
||||||
import Streams from "../components/streams";
|
|
||||||
import Announcements from "../components/announcements";
|
|
||||||
|
|
||||||
import { Image } from "@nextui-org/image";
|
import { Image } from "@nextui-org/image";
|
||||||
import { Button } from "@nextui-org/button";
|
import { Button } from "@nextui-org/button";
|
||||||
import { SiDiscord } from "@icons-pack/react-simple-icons";
|
import { SiDiscord } from "@icons-pack/react-simple-icons";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import Image from "next/image";
|
|
||||||
import User from "../../../components/user";
|
import User from "../../../components/user";
|
||||||
|
|
||||||
export default function UserPage() {
|
export default function UserPage() {
|
||||||
|
|
|
@ -1,28 +1,12 @@
|
||||||
import {
|
import {
|
||||||
Navbar as NavbarBase,
|
Navbar as NavbarBase,
|
||||||
NavbarBrand,
|
|
||||||
NavbarContent,
|
NavbarContent,
|
||||||
NavbarItem,
|
NavbarItem,
|
||||||
} from "@nextui-org/navbar";
|
} from "@nextui-org/navbar";
|
||||||
import { Link } from "@nextui-org/link";
|
import { Link } from "@nextui-org/link";
|
||||||
import { Button } from "@nextui-org/button";
|
|
||||||
import { Divider } from "@nextui-org/divider";
|
import { Divider } from "@nextui-org/divider";
|
||||||
import {
|
import { Tooltip } from "@nextui-org/react";
|
||||||
Dropdown,
|
import { SiDiscord, SiForgejo } from "@icons-pack/react-simple-icons";
|
||||||
DropdownItem,
|
|
||||||
DropdownMenu,
|
|
||||||
DropdownTrigger,
|
|
||||||
Image,
|
|
||||||
Tooltip,
|
|
||||||
} from "@nextui-org/react";
|
|
||||||
import {
|
|
||||||
SiBluesky,
|
|
||||||
SiDiscord,
|
|
||||||
SiForgejo,
|
|
||||||
SiLemmy,
|
|
||||||
SiTwitch,
|
|
||||||
} from "@icons-pack/react-simple-icons";
|
|
||||||
import { LogInIcon } from "lucide-react";
|
|
||||||
|
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,33 +1,40 @@
|
||||||
import { Button, Card, CardBody, Chip, User } from "@nextui-org/react";
|
import { Button, Card, CardBody, Chip, User } from "@nextui-org/react";
|
||||||
import { Heart } from "lucide-react";
|
import { Heart } from "lucide-react";
|
||||||
import { format, formatDistance, formatRelative } from "date-fns";
|
import { formatDistance } from "date-fns";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
export default function PostCard({post}) {
|
export default function PostCard({ post }) {
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<CardBody>
|
<CardBody>
|
||||||
<p className="text-xl">{post.title}</p>
|
<p className="text-xl">{post.title}</p>
|
||||||
|
|
||||||
{post.flairs && Object.values(post.flairs).map((flair) => <div key={flair.id}>
|
{post.flairs &&
|
||||||
<Chip>{flair.name}</Chip>
|
Object.values(post.flairs).map((flair) => (
|
||||||
</div>)}
|
<div key={flair.id}>
|
||||||
|
<Chip>{flair.name}</Chip>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<p>By</p>
|
<p>By</p>
|
||||||
<Link href={`/u/${post.author.slug}`}>
|
<Link href={`/u/${post.author.slug}`}>
|
||||||
<User
|
<User name={post.author.name} />
|
||||||
name={post.author.name}
|
</Link>
|
||||||
/>
|
<p>
|
||||||
</Link>
|
{formatDistance(new Date(post.createdAt), new Date(), {
|
||||||
<p>{formatDistance(new Date(post.createdAt), new Date(), { addSuffix: true })}</p>
|
addSuffix: true,
|
||||||
</div>
|
})}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p>{post.content}</p>
|
<p>{post.content}</p>
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<Button><Heart /> {post.likers.length}</Button>
|
<Button>
|
||||||
</div>
|
<Heart /> {post.likers.length}
|
||||||
</CardBody>
|
</Button>
|
||||||
</Card>
|
</div>
|
||||||
)
|
</CardBody>
|
||||||
}
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Button, Card, CardBody, Chip, User } from "@nextui-org/react";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Heart } from "lucide-react";
|
|
||||||
import Link from "next/link";
|
|
||||||
import PostCard from "./PostCard";
|
import PostCard from "./PostCard";
|
||||||
|
|
||||||
export default function Posts() {
|
export default function Posts() {
|
||||||
|
|
Loading…
Reference in a new issue