chore(format): add prettier-plugin-organize-imports and sort imports
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
"use client"
|
||||
|
||||
import { ClipboardList, Heart, MessageCircle, PenSquare, Pin } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { useState } from "react"
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"
|
||||
import { listGames, listOrders, listPlayers, listPosts } from "@/lib/api"
|
||||
import { roleLabels } from "@/lib/constants"
|
||||
import { ClipboardList, Heart, MessageCircle, PenSquare, Pin } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { useState } from "react"
|
||||
|
||||
export default function CommunityPage() {
|
||||
const games = listGames()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Link from "next/link"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import Link from "next/link"
|
||||
|
||||
export default function HelpPage() {
|
||||
return (
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
import { ArrowRight, Search, ShoppingBag, Star } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { listGames, listPlayers, listShops } from "@/lib/api"
|
||||
import { GameIcon } from "@/lib/game-icons"
|
||||
import { ArrowRight, Search, ShoppingBag, Star } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
|
||||
export default function HomePage() {
|
||||
const games = listGames()
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import { CheckCircle, Clock, MapPin, MessageSquare, ShoppingBag, Star } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { notFound } from "next/navigation"
|
||||
import { FavoriteButton } from "@/components/favorite-button"
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
@@ -16,6 +13,9 @@ import {
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
|
||||
import { listPlayers, listReviewsByTargetUser, listServicesByPlayer } from "@/lib/api"
|
||||
import { CheckCircle, Clock, MapPin, MessageSquare, ShoppingBag, Star } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
export default async function PlayerDetailPage({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = await params
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
import { ArrowLeft, Pin, Star } from "lucide-react"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import { notFound } from "next/navigation"
|
||||
import { PostCommentCount } from "@/components/post-comment-count"
|
||||
import { PostComments } from "@/components/post-comments"
|
||||
import { PostLikeButton } from "@/components/post-like-button"
|
||||
@@ -11,6 +7,10 @@ import { Card, CardContent, CardHeader } from "@/components/ui/card"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { getOrderById, getPlayerById, getPostById } from "@/lib/api"
|
||||
import { roleLabels } from "@/lib/constants"
|
||||
import { ArrowLeft, Pin, Star } from "lucide-react"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
export default async function PostDetailPage({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = await params
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
"use client"
|
||||
|
||||
import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"
|
||||
import { ArrowLeft, ImagePlus, X } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { useState } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { z } from "zod"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
@@ -24,6 +17,13 @@ import { useRequireAuth } from "@/lib/use-require-auth"
|
||||
import { useAuthStore } from "@/store/auth"
|
||||
import { useOrderStore } from "@/store/orders"
|
||||
import { usePostStore } from "@/store/posts"
|
||||
import { standardSchemaResolver } from "@hookform/resolvers/standard-schema"
|
||||
import { ArrowLeft, ImagePlus, X } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { useState } from "react"
|
||||
import { useForm } from "react-hook-form"
|
||||
import { z } from "zod"
|
||||
|
||||
const postSchema = z.object({
|
||||
title: z.string().min(2, "标题至少2个字符").max(50, "标题最多50个字符"),
|
||||
|
||||
+15
-15
@@ -1,20 +1,5 @@
|
||||
"use client"
|
||||
|
||||
import {
|
||||
CheckCircle2,
|
||||
Clock,
|
||||
Filter,
|
||||
Gamepad2,
|
||||
Search,
|
||||
SlidersHorizontal,
|
||||
Star,
|
||||
Store,
|
||||
User,
|
||||
XCircle,
|
||||
} from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { useRouter, useSearchParams } from "next/navigation"
|
||||
import { Suspense, useCallback, useEffect, useState } from "react"
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
import { Button } from "@/components/ui/button"
|
||||
@@ -47,6 +32,21 @@ import { GameIcon } from "@/lib/game-icons"
|
||||
import type { SearchResponse, SearchResultItem, SearchSort } from "@/lib/search/types"
|
||||
import type { Game, Player } from "@/lib/types"
|
||||
import { cn } from "@/lib/utils"
|
||||
import {
|
||||
CheckCircle2,
|
||||
Clock,
|
||||
Filter,
|
||||
Gamepad2,
|
||||
Search,
|
||||
SlidersHorizontal,
|
||||
Star,
|
||||
Store,
|
||||
User,
|
||||
XCircle,
|
||||
} from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { useRouter, useSearchParams } from "next/navigation"
|
||||
import { Suspense, useCallback, useEffect, useState } from "react"
|
||||
|
||||
const SEARCH_SORTS: ReadonlySet<SearchSort> = new Set([
|
||||
"composite",
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
import { Gamepad2, Megaphone, ShoppingBag, Star, Users } from "lucide-react"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import { notFound } from "next/navigation"
|
||||
import { FavoriteButton } from "@/components/favorite-button"
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
@@ -9,6 +5,10 @@ import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { getShopById, listPlayersByShop, listReviews, listServices } from "@/lib/api"
|
||||
import { Gamepad2, Megaphone, ShoppingBag, Star, Users } from "lucide-react"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
interface PageProps {
|
||||
params: Promise<{ id: string }>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Link from "next/link"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import Link from "next/link"
|
||||
|
||||
export default function TermsPage() {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import { MessageSquare, Star, ThumbsUp } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { notFound } from "next/navigation"
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
@@ -12,6 +9,9 @@ import {
|
||||
listPostsByAuthor,
|
||||
listShops,
|
||||
} from "@/lib/api"
|
||||
import { MessageSquare, Star, ThumbsUp } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
export default async function UserProfilePage({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = await params
|
||||
|
||||
Reference in New Issue
Block a user