fix(app): remove legacy and scoped namespace alias
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
import { Metadata } from "next";
|
||||
|
||||
import { PageLayout } from "#dashboard/components/shell/page-layout";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Articles | Basango Dashboard",
|
||||
};
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col gap-4 p-4 pt-0">
|
||||
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
|
||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
||||
<PageLayout leading="Manage your articles" title="Articles">
|
||||
<div className="flex flex-1 flex-col gap-4">
|
||||
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
|
||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
||||
<div className="bg-muted/50 aspect-video rounded-xl" />
|
||||
</div>
|
||||
<div className="bg-muted/50 min-h-screen flex-1 rounded-xl md:min-h-min" />
|
||||
</div>
|
||||
<div className="bg-muted/50 min-h-screen flex-1 rounded-xl md:min-h-min" />
|
||||
</div>
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { SidebarInset, SidebarProvider } from "@basango/ui/components/sidebar";
|
||||
|
||||
import { PageHeader } from "@/components/shell/page-header";
|
||||
import { AppSidebar } from "@/components/sidebar/app-sidebar";
|
||||
import { HydrateClient } from "@/trpc/server";
|
||||
import { PageHeader } from "#dashboard/components/shell/page-header";
|
||||
import { AppSidebar } from "#dashboard/components/sidebar/app-sidebar";
|
||||
import { HydrateClient } from "#dashboard/trpc/server";
|
||||
|
||||
export default async function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
|
||||
@@ -1,26 +1,31 @@
|
||||
import { RouterOutputs } from "@basango/api/trpc/routers/_app";
|
||||
import { Metadata } from "next";
|
||||
|
||||
import { PageLayout } from "@/components/shell/page-layout";
|
||||
import { SourceCard } from "@/components/source-card";
|
||||
import { batchPrefetch, getQueryClient, trpc } from "@/trpc/server";
|
||||
import { PageLayout } from "#dashboard/components/shell/page-layout";
|
||||
import { SourceCard } from "#dashboard/components/source-card";
|
||||
import { HydrateClient, getQueryClient, prefetch, trpc } from "#dashboard/trpc/server";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Sources | Basango Dashboard",
|
||||
};
|
||||
|
||||
type SourceDetails = RouterOutputs["sources"]["get"][number];
|
||||
|
||||
export default async function Page() {
|
||||
const queryClient = getQueryClient();
|
||||
|
||||
batchPrefetch([trpc.sources.get.queryOptions()]);
|
||||
prefetch(trpc.sources.get.queryOptions());
|
||||
const sources = await queryClient.fetchQuery(trpc.sources.get.queryOptions());
|
||||
|
||||
return (
|
||||
<PageLayout leading="Manage your news sources" title="Sources">
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
{sources.map((source) => (
|
||||
<SourceCard key={source.id} {...source} />
|
||||
))}
|
||||
</div>
|
||||
</PageLayout>
|
||||
<HydrateClient>
|
||||
<PageLayout leading="Manage your news sources" title="Sources">
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
{sources.map((source: SourceDetails) => (
|
||||
<SourceCard key={source.id} source={source} />
|
||||
))}
|
||||
</div>
|
||||
</PageLayout>
|
||||
</HydrateClient>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { GalleryVerticalEnd } from "lucide-react";
|
||||
|
||||
import { LoginForm } from "@/components/forms/login-form";
|
||||
import { LoginForm } from "#dashboard/components/forms/login-form";
|
||||
|
||||
export default function LoginPage() {
|
||||
return (
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
import { ThemeProvider } from "next-themes";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { I18nProviderClient } from "@/locales/client";
|
||||
import { TRPCReactProvider } from "@/trpc/client";
|
||||
import { I18nProviderClient } from "#dashboard/locales/client";
|
||||
import { TRPCReactProvider } from "#dashboard/trpc/client";
|
||||
|
||||
type ProviderProps = {
|
||||
locale: string;
|
||||
|
||||
Reference in New Issue
Block a user