Skip to content

Commit

Permalink
Revert infoscreen layout/page structure change
Browse files Browse the repository at this point in the history
- It seems that it is mandatory to have both layout and page files
  • Loading branch information
IiroP committed Jan 10, 2025
1 parent 9b078a6 commit f83751b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
37 changes: 37 additions & 0 deletions apps/web/src/app/infonaytto/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"use client";
import React from "react";
// eslint-disable-next-line camelcase -- Roboto_Mono name is set by next/font
import { Inter, Roboto_Mono } from "next/font/google";
import { cn } from "../../lib/utils.ts";
import "../globals.css";
import { InfoScreenHeader } from "../../components/infoscreen/infoscreen-header";

const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
});
const robotoMono = Roboto_Mono({
subsets: ["latin"],
variable: "--font-roboto-mono",
});

export default function ScreenLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="fi">
<body
className={cn(
inter.variable,
robotoMono.variable,
"flex h-full flex-col bg-gray-200 font-mono",
)}
>
<InfoScreenHeader />
<div className="size-full p-4">{children}</div>
</body>
</html>
);
}
8 changes: 8 additions & 0 deletions apps/web/src/app/infonaytto/naytto/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"use client";
import { InfoScreenContents } from "../../../components/infoscreen/info-screen-contents";

function InfoScreen() {
return <InfoScreenContents />;
}

export default InfoScreen;

0 comments on commit f83751b

Please sign in to comment.