Small refactoring.

master
Tomasz Półgrabia 2024-12-27 13:08:42 +01:00
parent f941f6fc20
commit 2514d86189
3 changed files with 3 additions and 3 deletions
2024/12/react_demo1/src

View File

@ -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);

View File

@ -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>