From 505d1db6b5138779cc3bf7580b1263fe9f9a6ea7 Mon Sep 17 00:00:00 2001 From: Buyankhuu Tsolmonkhuu Date: Tue, 3 Oct 2023 14:28:37 -0700 Subject: [PATCH] style:used deconstruction of props and changed import statement in styles --- src/app/components/InputFields.tsx | 5 +++-- src/app/page.tsx | 1 + src/app/screens/loginScreen/styles.ts | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/components/InputFields.tsx b/src/app/components/InputFields.tsx index 49e1e0b1..7afc34b6 100644 --- a/src/app/components/InputFields.tsx +++ b/src/app/components/InputFields.tsx @@ -3,11 +3,12 @@ import { FormHeaders, Input } from "../screens/loginScreen/styles" export default function InputFields(props: { text: string, placeholder: string }) { + const { text, placeholder } = props; return (
- {props.text} - + {text} +
diff --git a/src/app/page.tsx b/src/app/page.tsx index 6080bbd7..06658775 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,4 +1,5 @@ 'use client' + import LoginForm from "./components/LoginForm"; import { GlobalStyle, Fullscreen, LoginBox, LoginContent, WelcomeSign, Button } from "./screens/loginScreen/styles" diff --git a/src/app/screens/loginScreen/styles.ts b/src/app/screens/loginScreen/styles.ts index b221d701..a12336f1 100644 --- a/src/app/screens/loginScreen/styles.ts +++ b/src/app/screens/loginScreen/styles.ts @@ -1,5 +1,4 @@ -import { createGlobalStyle } from "styled-components"; -import styled from "styled-components"; +import styled, { createGlobalStyle } from "styled-components"; export const GlobalStyle = createGlobalStyle`