Skip to content

Commit

Permalink
🔧 Fix playground after latest update
Browse files Browse the repository at this point in the history
  • Loading branch information
amoutonbrady committed Jul 30, 2021
1 parent 4856be5 commit 18f8307
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions playground/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { createSignal, lazy } from 'solid-js';
import { MetaProvider } from 'solid-meta';
import { createApp } from 'solid-utils';
import { Router, Route, RouteDefinition, Link } from 'solid-app-router';
import { Router, useRoutes, RouteDefinition, Link } from 'solid-app-router';

import test from '@@/test.txt?raw'
import test from '@@/test.txt?raw';
import Home from '@/index';

// This needs to be tested once vite upgrade to esbuild 0.10.0
const json = await fetch('https://jsonplaceholder.typicode.com/todos/1').then((response) =>
response.json(),
);

// const json = await fetch('https://jsonplaceholder.typicode.com/todos/1')
// .then(response => response.json())

// console.log({ json })
console.log({ json });

// This should log Hello World
console.log(test)
console.log(test);

const routes: RouteDefinition[] = [
{
Expand All @@ -29,6 +28,7 @@ const routes: RouteDefinition[] = [

const App = () => {
const [count, setCount] = createSignal(0);
const Route = useRoutes(routes);

return (
<>
Expand All @@ -41,4 +41,4 @@ const App = () => {
);
};

createApp(App).use(MetaProvider).use(Router, { routes }).mount('#app');
createApp(App).use(MetaProvider).use(Router).mount('#app');

0 comments on commit 18f8307

Please sign in to comment.