mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: sort imports
This commit is contained in:
parent
265da435ad
commit
80058ff85a
@ -1,8 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import { CartesianGrid, Line, LineChart, XAxis, YAxis } from "recharts";
|
||||
|
||||
import NetworkChartLoading from "@/app/[locale]/(main)/ClientComponents/NetworkChartLoading";
|
||||
import {
|
||||
NezhaAPIMonitor,
|
||||
ServerMonitorChart,
|
||||
} from "@/app/[locale]/types/nezha-api";
|
||||
import { BackIcon } from "@/components/Icon";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
@ -18,15 +21,15 @@ import {
|
||||
ChartTooltip,
|
||||
ChartTooltipContent,
|
||||
} from "@/components/ui/chart";
|
||||
import useSWR from "swr";
|
||||
import { NezhaAPIMonitor, ServerMonitorChart } from "../../types/nezha-api";
|
||||
import getEnv from "@/lib/env-entry";
|
||||
import { formatTime, nezhaFetcher } from "@/lib/utils";
|
||||
import { formatRelativeTime } from "@/lib/utils";
|
||||
import { BackIcon } from "@/components/Icon";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useLocale } from "next-intl";
|
||||
import { useTranslations } from "next-intl";
|
||||
import NetworkChartLoading from "./NetworkChartLoading";
|
||||
import { useRouter } from "next/navigation";
|
||||
import * as React from "react";
|
||||
import { CartesianGrid, Line, LineChart, XAxis, YAxis } from "recharts";
|
||||
import useSWR from "swr";
|
||||
|
||||
interface ResultItem {
|
||||
created_at: number;
|
||||
@ -38,6 +41,10 @@ export function NetworkChartClient({ server_id }: { server_id: number }) {
|
||||
const { data, error } = useSWR<NezhaAPIMonitor[]>(
|
||||
`/api/monitor?server_id=${server_id}`,
|
||||
nezhaFetcher,
|
||||
{
|
||||
refreshInterval:
|
||||
Number(getEnv("NEXT_PUBLIC_NezhaFetchInterval")) || 10000,
|
||||
},
|
||||
);
|
||||
|
||||
if (error)
|
||||
|
@ -1,13 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { ServerApi } from "../../types/nezha-api";
|
||||
import ServerCard from "../../../../components/ServerCard";
|
||||
import { nezhaFetcher } from "../../../../lib/utils";
|
||||
import useSWR from "swr";
|
||||
import getEnv from "../../../../lib/env-entry";
|
||||
import { ServerApi } from "@/app/[locale]/types/nezha-api";
|
||||
import ServerCard from "@/components/ServerCard";
|
||||
import Switch from "@/components/Switch";
|
||||
import { useState } from "react";
|
||||
import getEnv from "@/lib/env-entry";
|
||||
import { nezhaFetcher } from "@/lib/utils";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useState } from "react";
|
||||
import useSWR from "swr";
|
||||
|
||||
export default function ServerListClient() {
|
||||
const t = useTranslations("ServerListClient");
|
||||
|
@ -1,14 +1,16 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Card, CardContent } from "../../../../components/ui/card";
|
||||
import blogMan from "../../../../public/blog-man.webp";
|
||||
import Image from "next/image";
|
||||
import useSWR from "swr";
|
||||
import { formatBytes, nezhaFetcher } from "../../../../lib/utils";
|
||||
import { Loader } from "../../../../components/loading/Loader";
|
||||
import { ServerApi } from "../../types/nezha-api";
|
||||
import getEnv from "../../../../lib/env-entry";
|
||||
|
||||
import { Loader } from "@/components/loading/Loader";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import getEnv from "@/lib/env-entry";
|
||||
import { formatBytes, nezhaFetcher } from "@/lib/utils";
|
||||
import blogMan from "@/public/blog-man.webp";
|
||||
import { ServerApi } from "@/app/[locale]/types/nezha-api";
|
||||
|
||||
export default function ServerOverviewClient() {
|
||||
const t = useTranslations("ServerOverviewClient");
|
||||
const { data } = useSWR<ServerApi>("/api/server", nezhaFetcher);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { NetworkChartClient } from "../ClientComponents/NetworkChart";
|
||||
import { NetworkChartClient } from "@/app/[locale]/(main)/ClientComponents/NetworkChart";
|
||||
|
||||
export default function Page({ params }: { params: { id: string } }) {
|
||||
return (
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
export default function Footer() {
|
||||
const t = useTranslations("Footer");
|
||||
return (
|
||||
|
@ -1,12 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslations } from "next-intl";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import Image from "next/image";
|
||||
import { Separator } from "../../../components/ui/separator";
|
||||
import { DateTime } from "luxon";
|
||||
import { ModeToggle } from "../../../components/ThemeSwitcher";
|
||||
import { LanguageSwitcher } from "@/components/LanguageSwitcher";
|
||||
import { ModeToggle } from "@/components/ThemeSwitcher";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import { DateTime } from "luxon";
|
||||
import { useTranslations } from "next-intl";
|
||||
import Image from "next/image";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
|
||||
function Header() {
|
||||
const t = useTranslations("Header");
|
||||
return (
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import Footer from "@/app/[locale]/(main)/footer";
|
||||
import Header from "@/app/[locale]/(main)/header";
|
||||
import Footer from "./footer";
|
||||
import React from "react";
|
||||
|
||||
type DashboardProps = {
|
||||
children: React.ReactNode;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import ServerList from "@/components/ServerList";
|
||||
import ServerOverview from "@/components/ServerOverview";
|
||||
import { unstable_setRequestLocale } from "next-intl/server";
|
||||
import ServerList from "../../../components/ServerList";
|
||||
import ServerOverview from "../../../components/ServerOverview";
|
||||
|
||||
export default function Home({
|
||||
params: { locale },
|
||||
|
@ -1,18 +1,17 @@
|
||||
// @auto-i18n-check. Please do not delete the line.
|
||||
|
||||
import "@/styles/globals.css";
|
||||
import "/node_modules/flag-icons/css/flag-icons.min.css";
|
||||
|
||||
import React from "react";
|
||||
import { NextIntlClientProvider, useMessages } from "next-intl";
|
||||
import { PublicEnvScript } from "next-runtime-env";
|
||||
import type { Metadata } from "next";
|
||||
import { Inter as FontSans } from "next/font/google";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
import { Viewport } from "next";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { locales } from "@/i18n-metadata";
|
||||
import { cn } from "@/lib/utils";
|
||||
import "@/styles/globals.css";
|
||||
import type { Metadata } from "next";
|
||||
import { Viewport } from "next";
|
||||
import { NextIntlClientProvider, useMessages } from "next-intl";
|
||||
import { unstable_setRequestLocale } from "next-intl/server";
|
||||
import { PublicEnvScript } from "next-runtime-env";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
import { Inter as FontSans } from "next/font/google";
|
||||
import React from "react";
|
||||
|
||||
import "/node_modules/flag-icons/css/flag-icons.min.css";
|
||||
|
||||
const fontSans = FontSans({
|
||||
subsets: ["latin"],
|
||||
|
@ -4,30 +4,31 @@ import Link from "next/link";
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
|
||||
export default function NotFoundPage() {
|
||||
const t = useTranslations("NotFoundPage");
|
||||
return (
|
||||
<main className="relative h-screen w-full">
|
||||
<div className="absolute inset-0 m-4 flex items-center justify-center">
|
||||
<Image
|
||||
priority
|
||||
className="rounded-3xl object-cover"
|
||||
src="/tardis.jpg"
|
||||
fill={true}
|
||||
alt="TARDIS"
|
||||
/>
|
||||
<div className="text-container absolute right-4 p-4 md:right-20">
|
||||
<h1 className="text-2xl font-bold opacity-80 md:text-5xl">
|
||||
{t("h1_490-590_404NotFound")}
|
||||
</h1>
|
||||
<p className="text-lg opacity-60 md:text-base">
|
||||
{t("p_601-665_TARDISERROR")}
|
||||
</p>
|
||||
<Link href={"/"} className="text-2xl opacity-80 md:text-3xl">
|
||||
{t("Link_676-775_Doctor")}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
const t = useTranslations("NotFoundPage");
|
||||
return (
|
||||
<main className="relative h-screen w-full">
|
||||
<div className="absolute inset-0 m-4 flex items-center justify-center">
|
||||
<Image
|
||||
priority
|
||||
className="rounded-3xl object-cover"
|
||||
src="/tardis.jpg"
|
||||
fill={true}
|
||||
alt="TARDIS"
|
||||
/>
|
||||
<div className="text-container absolute right-4 p-4 md:right-20">
|
||||
<h1 className="text-2xl font-bold opacity-80 md:text-5xl">
|
||||
{t("h1_490-590_404NotFound")}
|
||||
</h1>
|
||||
<p className="text-lg opacity-60 md:text-base">
|
||||
{t("p_601-665_TARDISERROR")}
|
||||
</p>
|
||||
<Link href={"/"} className="text-2xl opacity-80 md:text-3xl">
|
||||
{t("Link_676-775_Doctor")}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import { NextResponse } from "next/server";
|
||||
|
||||
export const runtime = 'edge';
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
interface NezhaDataResponse {
|
||||
error?: string;
|
||||
data?: ServerMonitorChart;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
const BlurLayers = () => {
|
||||
const computeLayerStyle = (index: number) => {
|
||||
const blurAmount = index * 3.7037;
|
||||
|
@ -1,10 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useLocale } from "next-intl";
|
||||
import { localeItems } from "../i18n-metadata";
|
||||
import { useRouter, usePathname } from "next/navigation";
|
||||
import * as React from "react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DropdownMenu,
|
||||
@ -12,6 +7,11 @@ import {
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { useLocale } from "next-intl";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
import * as React from "react";
|
||||
|
||||
import { localeItems } from "../i18n-metadata";
|
||||
|
||||
export function LanguageSwitcher() {
|
||||
const locale = useLocale();
|
||||
|
@ -1,5 +1,3 @@
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
import { NezhaAPISafe } from "../app/[locale]/types/nezha-api";
|
||||
import ServerUsageBar from "@/components/ServerUsageBar";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import {
|
||||
@ -8,12 +6,14 @@ import {
|
||||
PopoverTrigger,
|
||||
} from "@/components/ui/popover";
|
||||
import { cn, formatNezhaInfo } from "@/lib/utils";
|
||||
import ServerCardPopover from "./ServerCardPopover";
|
||||
|
||||
import { useLocale, useTranslations } from "next-intl";
|
||||
import { env } from "next-runtime-env";
|
||||
import ServerFlag from "./ServerFlag";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { NezhaAPISafe } from "@/app/[locale]/types/nezha-api";
|
||||
import ServerCardPopover from "@/components/ServerCardPopover";
|
||||
import ServerFlag from "@/components/ServerFlag";
|
||||
|
||||
export default function ServerCard({
|
||||
serverInfo,
|
||||
}: {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { NezhaAPISafe } from "../app/[locale]/types/nezha-api";
|
||||
import { cn, formatBytes } from "@/lib/utils";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
import { NezhaAPISafe } from "@/app/[locale]/types/nezha-api";
|
||||
|
||||
export function ServerCardPopoverCard({
|
||||
className,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import getUnicodeFlagIcon from "country-flag-icons/unicode";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export default function ServerFlag({ country_code }: { country_code: string }) {
|
||||
const [supportsEmojiFlags, setSupportsEmojiFlags] = useState(false);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
|
||||
import ServerListClient from "../app/[locale]/(main)/ClientComponents/ServerListClient";
|
||||
import ServerListClient from "@/app/[locale]/(main)/ClientComponents/ServerListClient";
|
||||
|
||||
export default async function ServerList() {
|
||||
return <ServerListClient />;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import ServerOverviewClient from "../app/[locale]/(main)/ClientComponents/ServerOverviewClient";
|
||||
import ServerOverviewClient from "@/app/[locale]/(main)/ClientComponents/ServerOverviewClient";
|
||||
|
||||
export default async function ServerOverview() {
|
||||
return <ServerOverviewClient />;
|
||||
|
@ -1,6 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
import { Progress } from "@/components/ui/progress";
|
||||
import React from "react";
|
||||
|
||||
type ServerUsageBarProps = {
|
||||
value: number;
|
||||
|
@ -1,8 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { motion } from "framer-motion";
|
||||
import React from "react";
|
||||
|
||||
export default function Switch({
|
||||
allTag,
|
||||
|
@ -1,10 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Moon, Sun } from "lucide-react";
|
||||
import { useTheme } from "next-themes";
|
||||
import * as React from "react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DropdownMenu,
|
||||
@ -12,6 +7,10 @@ import {
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { Moon, Sun } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useTheme } from "next-themes";
|
||||
import * as React from "react";
|
||||
|
||||
export function ModeToggle() {
|
||||
const { setTheme } = useTheme();
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { cva, type VariantProps } from "class-variance-authority";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import { type VariantProps, cva } from "class-variance-authority";
|
||||
import * as React from "react";
|
||||
|
||||
const badgeVariants = cva(
|
||||
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { Slot } from "@radix-ui/react-slot";
|
||||
import { cva, type VariantProps } from "class-variance-authority";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Slot } from "@radix-ui/react-slot";
|
||||
import { type VariantProps, cva } from "class-variance-authority";
|
||||
import * as React from "react";
|
||||
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
|
||||
|
@ -1,6 +1,5 @@
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as React from "react";
|
||||
|
||||
const Card = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
|
@ -1,10 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as React from "react";
|
||||
import * as RechartsPrimitive from "recharts";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
// Format: { THEME_NAME: CSS_SELECTOR }
|
||||
const THEMES = { light: "", dark: ".dark" } as const;
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
||||
import { Check, ChevronRight, Circle } from "lucide-react";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const DropdownMenu = DropdownMenuPrimitive.Root;
|
||||
|
||||
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
||||
|
@ -1,6 +1,5 @@
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as React from "react";
|
||||
|
||||
export interface InputProps
|
||||
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
||||
import { cva } from "class-variance-authority";
|
||||
import { ChevronDown } from "lucide-react";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const NavigationMenu = React.forwardRef<
|
||||
React.ElementRef<typeof NavigationMenuPrimitive.Root>,
|
||||
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
|
||||
|
@ -1,9 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
||||
import * as React from "react";
|
||||
|
||||
const Popover = PopoverPrimitive.Root;
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const Progress = React.forwardRef<
|
||||
React.ElementRef<typeof ProgressPrimitive.Root>,
|
||||
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & {
|
||||
|
@ -1,9 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
||||
import * as React from "react";
|
||||
|
||||
const Separator = React.forwardRef<
|
||||
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
||||
|
@ -1,12 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
||||
import { cva, type VariantProps } from "class-variance-authority";
|
||||
import { type VariantProps, cva } from "class-variance-authority";
|
||||
import { X } from "lucide-react";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const Sheet = SheetPrimitive.Root;
|
||||
|
||||
const SheetTrigger = SheetPrimitive.Trigger;
|
||||
|
@ -1,10 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const TooltipProvider = TooltipPrimitive.Provider;
|
||||
|
||||
const Tooltip = TooltipPrimitive.Root;
|
||||
|
@ -1,5 +1,4 @@
|
||||
// @auto-i18n-check. Please do not delete the line.
|
||||
|
||||
import getEnv from "./lib/env-entry";
|
||||
|
||||
export const localeItems = [
|
||||
|
4
i18n.ts
4
i18n.ts
@ -1,7 +1,7 @@
|
||||
// @auto-i18n-check. Please do not delete the line.
|
||||
|
||||
import { notFound } from "next/navigation";
|
||||
import { getRequestConfig } from "next-intl/server";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
import { locales } from "./i18n-metadata";
|
||||
|
||||
export default getRequestConfig(async ({ locale }) => {
|
||||
|
@ -1,9 +1,10 @@
|
||||
"use server";
|
||||
|
||||
import { NezhaAPI, ServerApi } from "../app/[locale]/types/nezha-api";
|
||||
import { MakeOptional } from "../app/[locale]/types/utils";
|
||||
import { unstable_noStore as noStore } from "next/cache";
|
||||
import getEnv from "./env-entry";
|
||||
|
||||
import { NezhaAPI, ServerApi } from "@/app/[locale]/types/nezha-api";
|
||||
import { MakeOptional } from "@/app/[locale]/types/utils";
|
||||
import getEnv from "@/lib/env-entry";
|
||||
|
||||
export async function GetNezhaData() {
|
||||
noStore();
|
||||
|
@ -1,4 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import useSWRSubscription, {
|
||||
type SWRSubscriptionOptions,
|
||||
} from "swr/subscription";
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { NezhaAPISafe } from "../app/[locale]/types/nezha-api";
|
||||
import { type ClassValue, clsx } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
import { NezhaAPISafe } from "@/app/[locale]/types/nezha-api";
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// @auto-i18n-check. Please do not delete the line.
|
||||
|
||||
import createMiddleware from "next-intl/middleware";
|
||||
|
||||
import { defaultLocale, locales } from "./i18n-metadata";
|
||||
|
||||
export default createMiddleware({
|
||||
|
@ -1,12 +1,13 @@
|
||||
import withPWAInit from "@ducanh2912/next-pwa";
|
||||
import withBundleAnalyzer from "@next/bundle-analyzer";
|
||||
import createNextIntlPlugin from "next-intl/plugin";
|
||||
|
||||
const bundleAnalyzer = withBundleAnalyzer({
|
||||
enabled: process.env.ANALYZE === "true",
|
||||
});
|
||||
|
||||
import createNextIntlPlugin from "next-intl/plugin";
|
||||
const withNextIntl = createNextIntlPlugin();
|
||||
import withPWAInit from "@ducanh2912/next-pwa";
|
||||
|
||||
const withPWA = withPWAInit({
|
||||
dest: "public",
|
||||
cacheOnFrontEndNav: true,
|
||||
|
@ -20,6 +20,7 @@
|
||||
"@radix-ui/react-separator": "^1.1.0",
|
||||
"@radix-ui/react-slot": "^1.1.0",
|
||||
"@radix-ui/react-tooltip": "^1.1.3",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/luxon": "^3.4.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
||||
"caniuse-lite": "^1.0.30001667",
|
||||
|
@ -1,4 +1,10 @@
|
||||
// prettier.config.js
|
||||
module.exports = {
|
||||
plugins: ["prettier-plugin-tailwindcss"],
|
||||
importOrder: ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
|
||||
importOrderSeparation: true,
|
||||
importOrderSortSpecifiers: true,
|
||||
plugins: [
|
||||
"prettier-plugin-tailwindcss",
|
||||
"@trivago/prettier-plugin-sort-imports",
|
||||
],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user