Chap03 -> Creating function-based components -> Creating mock data
This commit is contained in:
parent
b11004925a
commit
f0492816c5
@ -1,11 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Header } from './Header';
|
import { Header } from './Header';
|
||||||
import './App.css';
|
import './App.css';
|
||||||
|
import { HomePage } from './HomePage';
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<Header />
|
<Header />
|
||||||
|
<HomePage />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
10
QandA/frontend/src/HomePage.tsx
Normal file
10
QandA/frontend/src/HomePage.tsx
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
export const HomePage = () => (
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<h2>Unanswered Questions</h2>
|
||||||
|
<button>Ask a question</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
Loading…
x
Reference in New Issue
Block a user