mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-22 22:47:02 +00:00
Cleans up code
This commit is contained in:
parent
96c8ba64dd
commit
632fc0c166
@ -1,7 +1,6 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
import * as apiService from "../../services/apiService";
|
||||
import { prettifyJson } from "../../utils/jsonUtils";
|
||||
import Heading1 from "./Heading1";
|
||||
import Button from "./Button";
|
||||
import Table from "./table/Table";
|
||||
@ -50,6 +49,7 @@ const VehiclesMain = () => {
|
||||
|
||||
useEffect(() => {
|
||||
getVehicles();
|
||||
// eslint-disable-next-line
|
||||
}, []);
|
||||
|
||||
async function getVehicles() {
|
||||
@ -75,14 +75,6 @@ const VehiclesMain = () => {
|
||||
</h3>
|
||||
|
||||
<Table vehicleData={vehicleData} />
|
||||
|
||||
{/* <ul>
|
||||
{vehicleData.map((v) => (
|
||||
<li key={v.id}>
|
||||
{v.color} {v.model} ({v.licensePlate}) - {getType(v.type)}
|
||||
</li>
|
||||
))}
|
||||
</ul> */}
|
||||
</>
|
||||
) : (
|
||||
<h3 className="font-light font-inter text-black-custom my-32 self-center">
|
||||
|
||||
@ -5,9 +5,9 @@ import { BsThreeDots } from "react-icons/bs";
|
||||
const EditBtns = () => {
|
||||
return (
|
||||
<div className="flex">
|
||||
<FiTrash className="mx-3" />
|
||||
<FiSettings className="mx-3" />
|
||||
<BsThreeDots className="mx-3 text-3xl" />
|
||||
<FiTrash className="mx-3 cursor-pointer" />
|
||||
<FiSettings className="mx-3 cursor-pointer" />
|
||||
<BsThreeDots className="mx-3 text-3xl cursor-pointer" />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@ -5,6 +5,7 @@ import TableData from "./TableData";
|
||||
|
||||
const Table = ({ vehicleData }) => {
|
||||
function getType(type) {
|
||||
// eslint-disable-next-line
|
||||
switch (type) {
|
||||
case 1:
|
||||
return "Sedan";
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
export const prettifyJson = (value) => {
|
||||
return JSON.stringify(value, null, 2);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user