style(problem): adjust problem layout styles

This commit is contained in:
cfngc4594 2025-04-17 07:44:41 +08:00
parent 569beb0b36
commit 30ee16fbf0
7 changed files with 12 additions and 12 deletions

View File

@ -9,8 +9,8 @@ interface CodeLayoutProps {
export default function CodeLayout({ children }: CodeLayoutProps) { export default function CodeLayout({ children }: CodeLayoutProps) {
return ( return (
<div className="flex flex-col h-full"> <div className="flex flex-col h-full border border-t-0 border-muted rounded-b-3xl bg-background">
<WorkspaceEditorHeader className="border-b border-x border-muted bg-background" /> <WorkspaceEditorHeader />
<Suspense fallback={<Loading />}> <Suspense fallback={<Loading />}>
{children} {children}
</Suspense> </Suspense>

View File

@ -2,7 +2,7 @@ import { ProblemEditor } from "@/components/problem-editor";
export default function CodePage() { export default function CodePage() {
return ( return (
<div className="relative flex-1 border-x border-muted"> <div className="relative flex-1">
<div className="absolute w-full h-full"> <div className="absolute w-full h-full">
<ProblemEditor /> <ProblemEditor />
</div> </div>

View File

@ -7,7 +7,7 @@ interface DescriptionLayoutProps {
export default function DescriptionLayout({ children }: DescriptionLayoutProps) { export default function DescriptionLayout({ children }: DescriptionLayoutProps) {
return ( return (
<div className="h-full flex flex-col"> <div className="h-full flex flex-col border border-t-0 border-muted rounded-b-3xl bg-background">
<Suspense fallback={<Loading />}> <Suspense fallback={<Loading />}>
{children} {children}
</Suspense> </Suspense>

View File

@ -29,7 +29,7 @@ export default async function DescriptionPage({ params }: DescriptionPageProps)
return ( return (
<> <>
<div className="relative flex-1 border-x border-muted"> <div className="relative flex-1">
<div className="absolute h-full w-full"> <div className="absolute h-full w-full">
<ScrollArea className="h-full [&>[data-radix-scroll-area-viewport]>div:min-w-0 [&>[data-radix-scroll-area-viewport]>div]:!block bg-background"> <ScrollArea className="h-full [&>[data-radix-scroll-area-viewport]>div:min-w-0 [&>[data-radix-scroll-area-viewport]>div]:!block bg-background">
<MdxPreview source={problem.description} className="p-4 md:p-6" /> <MdxPreview source={problem.description} className="p-4 md:p-6" />

View File

@ -1,15 +1,15 @@
import { Suspense } from "react"; import { Suspense } from "react";
import { getUserLocale } from "@/i18n/locale";
import { Loading } from "@/components/loading"; import { Loading } from "@/components/loading";
import DetailsPage from "@/app/(app)/problems/[id]/@Details/page";
interface DetailsLayoutProps { export default async function DetailsLayout() {
children: React.ReactNode; const locale = await getUserLocale();
}
export default async function DetailsLayout({ children }: DetailsLayoutProps) {
return ( return (
<div className="flex flex-col h-full border border-t-0 border-muted rounded-b-3xl bg-background"> <div className="flex flex-col h-full border border-t-0 border-muted rounded-b-3xl bg-background">
<Suspense fallback={<Loading />}> <Suspense fallback={<Loading />}>
{children} <DetailsPage locale={locale} />;
</Suspense> </Suspense>
</div> </div>
); );

View File

@ -7,7 +7,7 @@ interface SolutionsLayoutProps {
export default async function SolutionsLayout({ children }: SolutionsLayoutProps) { export default async function SolutionsLayout({ children }: SolutionsLayoutProps) {
return ( return (
<div className="flex flex-col h-full"> <div className="flex flex-col h-full border border-t-0 border-muted rounded-b-3xl bg-background">
<Suspense fallback={<Loading />}> <Suspense fallback={<Loading />}>
{children} {children}
</Suspense> </Suspense>

View File

@ -29,7 +29,7 @@ export default async function SolutionsPage({ params }: SolutionsPageProps) {
return ( return (
<> <>
<div className="relative flex-1 border-x border-muted"> <div className="relative flex-1">
<div className="absolute h-full w-full"> <div className="absolute h-full w-full">
<ScrollArea className="h-full [&>[data-radix-scroll-area-viewport]>div:min-w-0 [&>[data-radix-scroll-area-viewport]>div]:!block bg-background"> <ScrollArea className="h-full [&>[data-radix-scroll-area-viewport]>div:min-w-0 [&>[data-radix-scroll-area-viewport]>div]:!block bg-background">
<MdxPreview source={problem.solution} className="p-4 md:p-6" /> <MdxPreview source={problem.solution} className="p-4 md:p-6" />