Skip to content

Commit

Permalink
chore:fixing eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
BuyankhuuTsCAl committed Oct 11, 2023
1 parent 7cbf6c0 commit 495d83d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/app/storefront/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use client';

import React, { useState } from 'react';
import { getProduct, filterProduct } from './helperFunction';
import React from 'react';
import { useState } from 'react';
import { buttons } from './data.js';
import { GlobalStyle, ButtonsContainer } from './styles';
import ProductButtons from './productButtons';

//https://codesandbox.io/s/filter-with-react-button-r5x4i?file=/src/App.js
// https://codesandbox.io/s/filter-with-react-button-r5x4i?file=/src/App.js
export default function App() {
const [filtredProduct, setFiltredProducts] = useState(null);
const [isClicked, setisClicked] = useState(false);
Expand All @@ -21,7 +21,7 @@ export default function App() {
value={type.value}
setFiltredProducts={setFiltredProducts}
content={type.name}
></ProductButtons>
/>
))}
</ButtonsContainer>
</main>
Expand Down
7 changes: 4 additions & 3 deletions src/app/storefront/productButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use client';

import React, { useState } from 'react';
import { Button, Label, IndividualContainer } from './styles';
import { getProduct, filterProduct } from './helperFunction';
import React from 'react';
import { useState } from 'react';

export default function ProductButtons(props: {
key: number;
value: string;
Expand All @@ -15,7 +16,7 @@ export default function ProductButtons(props: {
e: React.MouseEvent<HTMLButtonElement, MouseEvent>,
) {
setIsClicked(!IsClicked);
let category = e.currentTarget.value;
const category = e.currentTarget.value;
console.log(category);
category != 'All'
? setFiltredProducts(await filterProduct(category))
Expand Down
5 changes: 3 additions & 2 deletions src/components/InputFields.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use client';

import { FormHeaders, Input } from '../app/login/styles';
import { useState } from 'react';
import { FormHeaders, Input } from '../app/login/styles';

export default function InputFields(props: {
text: string;
placeholder: string;
Expand All @@ -21,7 +22,7 @@ export default function InputFields(props: {
const [inputValue, setInputValue] = useState('');

const handleChange = (e: { target: { value: any } }) => {
const value = e.target.value;
const {value} = e.target;
setInputValue(value);

if (isPassword) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function LoginForm(props: {
placeholder="************"
changeUserName={changeUserName}
changePassword={changePassword}
isPassword={true}
isPassword
/>
</div>
);
Expand Down

0 comments on commit 495d83d

Please sign in to comment.