Skip to content

Commit

Permalink
change page title + test next.js routing
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricve committed May 19, 2024
1 parent 1d66f23 commit 48939ba
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/__tests__/Home.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import "@testing-library/jest-dom";
import { render, screen } from "@testing-library/react";
import Home from "../src/app/page.tsx";
import Home from "../src/app/home.tsx";

describe("Home", () => {
it("renders a heading", () => {
Expand Down
27 changes: 27 additions & 0 deletions ui/src/app/home/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Button, Input, Gradient, Socials, Box, Stack, Password, Row } from "../../components/ui";
import React from "react";

export default function Home() {
return (
<Box className="shadow-inner min-h-screen min-w-fit max-w-96 w-4/12 flex flex-col items-start bg-primary-50/15">
<Gradient />

<h1>Home</h1>
<Stack className="p-8">
<Input
type="text"
id="username"
placeholder="username"
className="mb-4"
/>
<Row className="mb-1"></Row>
<Password placeholder="password" id="username" className="mb-4" />
<Button type="submit" variant="solid" width="third">
Sign in
</Button>
</Stack>
<Socials className="mt-auto self-center justify-self-end p-8" />
</Box>
);
}

5 changes: 3 additions & 2 deletions ui/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import type { Metadata } from "next";
import Head from 'next/head';
import { Inter } from "next/font/google";
import "../index.css";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "Facial access control",
description: "By UUG.AI",
};

export default function RootLayout({
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Input, Gradient, Socials, Box, Stack, Password, Row } from "../components/ui";
import React from "react";

export default function Home() {
export default function App() {
return (
<Box className="shadow-inner min-h-screen min-w-fit max-w-96 w-4/12 flex flex-col items-start bg-primary-50/15">
<Gradient />
Expand Down

0 comments on commit 48939ba

Please sign in to comment.