From 2514d86189ee591b872625d06796e274cf5bee1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= Date: Fri, 27 Dec 2024 13:08:42 +0100 Subject: [PATCH] Small refactoring. --- 2024/12/react_demo1/src/App.jsx | 2 +- 2024/12/react_demo1/src/{appInfoCtx.js => AppInfoCtx.js} | 0 2024/12/react_demo1/src/Item.jsx | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename 2024/12/react_demo1/src/{appInfoCtx.js => AppInfoCtx.js} (100%) diff --git a/2024/12/react_demo1/src/App.jsx b/2024/12/react_demo1/src/App.jsx index 540615c..f64f5d9 100644 --- a/2024/12/react_demo1/src/App.jsx +++ b/2024/12/react_demo1/src/App.jsx @@ -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); diff --git a/2024/12/react_demo1/src/appInfoCtx.js b/2024/12/react_demo1/src/AppInfoCtx.js similarity index 100% rename from 2024/12/react_demo1/src/appInfoCtx.js rename to 2024/12/react_demo1/src/AppInfoCtx.js diff --git a/2024/12/react_demo1/src/Item.jsx b/2024/12/react_demo1/src/Item.jsx index 3d22532..06ba4ac 100644 --- a/2024/12/react_demo1/src/Item.jsx +++ b/2024/12/react_demo1/src/Item.jsx @@ -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 (
  • Item {pos}