From 7543f7bcc9f7010bd1c2324ff9965486bc3e19c3 Mon Sep 17 00:00:00 2001 From: Kilian Date: Thu, 13 Jun 2024 12:27:42 +0200 Subject: [PATCH] Fix babel linter issues --- ui/.eslintrc.json | 6 +---- ui/.gitignore | 3 +-- ui/next.config.mjs | 4 +-- ui/src/app/onboarding/page.tsx | 41 +++++++++++++++++++++++------ ui/src/components/SignOutButton.tsx | 4 ++- 5 files changed, 39 insertions(+), 19 deletions(-) diff --git a/ui/.eslintrc.json b/ui/.eslintrc.json index 47be497..48bf56e 100644 --- a/ui/.eslintrc.json +++ b/ui/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": [ - "next/babel", - "next/core-web-vitals", - "plugin:storybook/recommended" - ] + "extends": ["next", "next/core-web-vitals", "plugin:storybook/recommended"] } diff --git a/ui/.gitignore b/ui/.gitignore index c9a5abc..c12a8cd 100644 --- a/ui/.gitignore +++ b/ui/.gitignore @@ -39,5 +39,4 @@ next-env.d.ts /test-results/ /playwright-report/ /blob-report/ -/playwright/.cache/ -.env*.local \ No newline at end of file +/playwright/.cache/ \ No newline at end of file diff --git a/ui/next.config.mjs b/ui/next.config.mjs index 7f9f6f0..0669a04 100644 --- a/ui/next.config.mjs +++ b/ui/next.config.mjs @@ -1,8 +1,6 @@ - - /** @type {import('next').NextConfig} */ const nextConfig = { - // basePath: "/facial-access-control", <==== required for github pages only. + // basePath: "/facial-access-control", // <==== required for github pages only. // output: "export", // <=== enables static exports reactStrictMode: true, }; diff --git a/ui/src/app/onboarding/page.tsx b/ui/src/app/onboarding/page.tsx index 222886a..b4db64b 100644 --- a/ui/src/app/onboarding/page.tsx +++ b/ui/src/app/onboarding/page.tsx @@ -1,7 +1,17 @@ "use client"; import React, { useState } from "react"; -import { Box, Row, Stack, Gradient, Text, Button, Socials, Icon, VideoCapture } from "../../components/ui"; +import { + Box, + Row, + Stack, + Gradient, + Text, + Button, + Socials, + Icon, + VideoCapture, +} from "../../components/ui"; import FormComponent from "./components/FormComponent"; import { SubmitHandler } from "react-hook-form"; import * as z from "zod"; @@ -39,7 +49,7 @@ const Onboarding: React.FC = () => { console.log("Form data with video:", data); - setIsSubmitted(true); + setIsSubmitted(true); } else { console.error("Video is required in onSubmit"); } @@ -75,7 +85,11 @@ interface FaceScanSectionProps { handleRecordingComplete: (recordedChunks: Blob[]) => void; } -const FaceScanSection: React.FC = ({ isRecording, setIsRecording, handleRecordingComplete }) => ( +const FaceScanSection: React.FC = ({ + isRecording, + setIsRecording, + handleRecordingComplete, +}) => ( = ({ isRecording, setIsRec const InfoSection = () => ( - - Hello, this is a registration form where you can register with a video of yourself!
- We will use this video to create biometrics, so you get access into the company and won't need to use a badge or card. + + Hello, this is a registration form where you can register with a video + of yourself! <br /> We will use this video to create biometrics, + so you get access into the company and won't need to use a badge or + card. +
@@ -117,7 +134,11 @@ const InfoSection = () => ( About UUFT.Ai - Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus vero reiciendis quae porro, voluptates odit. Culpa ipsam beatae voluptas vitae est repudiandae, nulla atque, reiciendis labore, voluptatibus eum dolorem! Id inventore quidem ipsam impedit possimus? + Lorem ipsum dolor sit amet consectetur adipisicing elit. + Voluptatibus vero reiciendis quae porro, voluptates odit. Culpa + ipsam beatae voluptas vitae est repudiandae, nulla atque, reiciendis + labore, voluptatibus eum dolorem! Id inventore quidem ipsam impedit + possimus?
@@ -127,7 +148,11 @@ const InfoSection = () => ( About UUFT.Ai - Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus vero reiciendis quae porro, voluptates odit. Culpa ipsam beatae voluptas vitae est repudiandae, nulla atque, reiciendis labore, voluptatibus eum dolorem! Id inventore quidem ipsam impedit possimus? + Lorem ipsum dolor sit amet consectetur adipisicing elit. + Voluptatibus vero reiciendis quae porro, voluptates odit. Culpa + ipsam beatae voluptas vitae est repudiandae, nulla atque, reiciendis + labore, voluptatibus eum dolorem! Id inventore quidem ipsam impedit + possimus?
diff --git a/ui/src/components/SignOutButton.tsx b/ui/src/components/SignOutButton.tsx index 3c81e47..9ab3444 100644 --- a/ui/src/components/SignOutButton.tsx +++ b/ui/src/components/SignOutButton.tsx @@ -2,4 +2,6 @@ import { signOut } from "next-auth/react"; -export default () => ; +const SignOutButton = () => ; + +export default SignOutButton;