const [enemy, setEnemy] = useState({
count: 0,
cards: []
})
{
"name": "client",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:3001",
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"axios": "^0.21.0",
"draft-js": "^0.11.7",
"react": "^17.0.1",
"react-admin": "^3.10.3",
"react-dom": "^17.0.1",
"react-draft-wysiwyg": "^1.14.5",
"react-helmet": "^6.1.0",
"react-html-parser": "^2.0.2",
"react-icons": "^4.1.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"suneditor-react": "^2.14.9",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
const newsSchema = new Schema({
title: {
type: String,
required: true
},
shortDescr: {
type: String,
required: true
},
descr: {
type: String,
required: true
},
image: {
type: String,
required: true,
default: 'https://static8.depositphotos.com/1338574/829/i/600/depositphotos_8292496-stock-photo-news.jpg'
},
date: {
type: Date,
default: Date.now
}
})
import * as React from "react";
import { Admin, Resource, ListGuesser } from 'react-admin';
import jsonServerProvider from 'ra-data-json-server';
const dataProvider = jsonServerProvider('https://jsonplaceholder.typicode.com');
const App = () => (
<Admin dataProvider={dataProvider}>
<Resource name="users" list={ListGuesser} />
</Admin>
);
export default App;
}