-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
correct extensions for imports - show path on homepage
- Loading branch information
1 parent
4c00c65
commit 2b9b381
Showing
6 changed files
with
68 additions
and
12 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
import React from "react"; | ||
import {createRoot} from "react-dom/client" | ||
import { createRoot } from "react-dom/client"; | ||
import WalkingSkeleton from "./pages/WalkingSkeleton"; | ||
|
||
// A simple Class component | ||
class WalkingSkeleton extends React.Component { | ||
render() { | ||
return <h1>ewan's walking skeleton</h1> | ||
} | ||
} | ||
// const WalkingSkeleton = () => { | ||
// return <h1>ewan's walking skeleton</h1>; | ||
// }; | ||
|
||
// Use traditional DOM manipulation to create a root element for React | ||
document.body.innerHTML = '<div id="app"></div>' | ||
document.body.innerHTML = '<div id="app"></div>'; | ||
|
||
// Create a root element for React | ||
const app = createRoot(document.getElementById("app")!) | ||
const app = createRoot(document.getElementById("app")!); | ||
// Render our WalkingSkeleton component | ||
app.render(<WalkingSkeleton/>) | ||
app.render( | ||
<> | ||
<p>{window.location.pathname}</p> | ||
<WalkingSkeleton /> | ||
</> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const WalkingSkeleton = () => { | ||
return <p>ewan's imported walking sheldon</p> | ||
} | ||
|
||
export default WalkingSkeleton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters