Skip to content

Commit

Permalink
#26: final cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
espen42 committed Sep 5, 2021
1 parent 9dee3f0 commit f6248b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions next/src/components/BasePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@ export const clientSideBasePageBuilder = branch => {
setProps(props => ({...props, fetching: true}));
const contentResult = await fetchContent(branch, contentPath);

setTimeout(() => {

// @ts-ignore
setProps(() => contentResult);

// Simulate server delay: comment out the setProps line above, and activate this:
/*setTimeout(() => {
// @ts-ignore
setProps(() => contentResult);
},
750);
750);*/
};

if (contentPath !== undefined) {
Expand Down
2 changes: 1 addition & 1 deletion next/src/components/templates/Default.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Props = {
const DefaultPage = (props: Props) => {
return (
<>
<p>Item:</p>
<p>Content item:</p>
<h2>{props.displayName}</h2>
<pre>{JSON.stringify(props, null, 2)}</pre>
</>
Expand Down
2 changes: 1 addition & 1 deletion next/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
html,
body {
padding: 0;
padding: 10px;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
Expand Down

0 comments on commit f6248b0

Please sign in to comment.