diff --git a/apps/ogre-demo/pages/index.tsx b/apps/ogre-demo/pages/index.tsx index 43e3b37..d50a1c7 100644 --- a/apps/ogre-demo/pages/index.tsx +++ b/apps/ogre-demo/pages/index.tsx @@ -79,7 +79,7 @@ const Home: NextPage = () => { { if (!repository) { - setupRepo() + setupRepo().then(r => setRepository(r)) } return () => setRepository(undefined) }, []) - + const setupRepo = async () => { let author = 'author ' const r = new Repository({description: '', name: ''}, {}) @@ -147,8 +147,8 @@ const code = ` r.checkout('main') r.merge('description') - setRepository(r) + return r } - + return repository ? : null }`;