Small refactoring.
parent
f941f6fc20
commit
2514d86189
2024/12/react_demo1/src
|
@ -4,7 +4,7 @@ import viteLogo from '/vite.svg'
|
|||
import './App.css'
|
||||
import styles from './App.module.scss';
|
||||
import Item from './Item.jsx';
|
||||
import AppInfoCtx from "./appInfoCtx.js";
|
||||
import AppInfoCtx from "./AppInfoCtx.js";
|
||||
|
||||
function App() {
|
||||
const [count, setCount] = useState(0);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import "bulma";
|
||||
import {useContext, useState} from "react";
|
||||
import styles from './Item.module.css';
|
||||
import appInfoCtx from "./appInfoCtx.js";
|
||||
import AppInfoCtx from "./AppInfoCtx.js";
|
||||
|
||||
export default function Item({pos, callback}) {
|
||||
let [loading, setLoading] = useState(false);
|
||||
const appInfo = useContext(appInfoCtx);
|
||||
const appInfo = useContext(AppInfoCtx);
|
||||
return (<li className={'my-4 ' + styles.item}>
|
||||
<div>
|
||||
<div style={{"display": "inline-block"}} className="box m-4"><span>Item {pos}</span></div>
|
||||
|
|
Loading…
Reference in New Issue