chore: Get Started

This commit is contained in:
the-all-good 2024-12-03 19:29:15 +11:00
parent 78b640551e
commit cc4dfa309d
12 changed files with 48 additions and 28 deletions

View File

@ -1,25 +0,0 @@
import logo from './logo.svg';
import './App.css';
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}
export default App;

View File

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom/client'; import ReactDOM from 'react-dom/client';
import './index.css'; import '../src/css/index.css';
import App from './App'; import App from '../src/js/App';
import reportWebVitals from './reportWebVitals'; import reportWebVitals from '../src/js/reportWebVitals';
const root = ReactDOM.createRoot(document.getElementById('root')); const root = ReactDOM.createRoot(document.getElementById('root'));
root.render( root.render(

19
frontend/src/js/App.js Normal file
View File

@ -0,0 +1,19 @@
import logo from '../resources/logo.svg';
import '../css/App.css';
import Leaderboard from './components/leaderboard';
import GameCard from './components/gameCard';
import Button from './components/button';
function App() {
return (
<div className="App">
<header className="App-header">
<Leaderboard />
<GameCard />
<Button displayValue="Click Me" />
</header>
</div>
);
}
export default App;

View File

@ -0,0 +1,12 @@
import React from 'react';
function Button(props){
return (
<button>
{console.log(props)}
{props.displayValue}
</button>
);
}
export default Button;

View File

@ -0,0 +1,7 @@
import React from 'react';
function GameCard(){
return <h1>GameCard</h1>;
}
export default GameCard;

View File

@ -0,0 +1,7 @@
import React from 'react';
function Leaderboard(){
return <h1>Leaderboard</h1>;
}
export default Leaderboard;

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB