Skip to content

Commit

Permalink
chore: update example
Browse files Browse the repository at this point in the history
  • Loading branch information
yunsii committed Apr 12, 2021
1 parent e09296d commit 836a4e2
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 15 deletions.
2 changes: 0 additions & 2 deletions example/src/components/Block/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export default function Block({ children }: { children?: React.ReactNode }) {
if (!children) {
return null;
Expand Down
2 changes: 0 additions & 2 deletions example/src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export interface ButtonProps {
onClick?: () => void;
}
Expand Down
2 changes: 0 additions & 2 deletions example/src/components/PageLoading/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export default function PageLoading() {
return <div>Loading...</div>;
}
1 change: 0 additions & 1 deletion example/src/layouts/BasicLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { Link } from '@vitjs/vit';

import Block from '@/components/Block';
Expand Down
2 changes: 0 additions & 2 deletions example/src/layouts/BlankLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import Block from '@/components/Block';

const Layout: React.FC = ({ children }) => {
Expand Down
2 changes: 0 additions & 2 deletions example/src/layouts/UserLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import Block from '@/components/Block';

const Layout: React.FC = ({ children }) => {
Expand Down
1 change: 0 additions & 1 deletion example/src/pages/Account/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { history } from '@vitjs/vit';

import Block from '@/components/Block';
Expand Down
1 change: 0 additions & 1 deletion example/src/pages/User/Login/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { history } from '@vitjs/vit';

import Block from '@/components/Block';
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/Welcome/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';

import Block from '@/components/Block';
import Button from '@/components/Button';
Expand Down
2 changes: 1 addition & 1 deletion example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react",
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
Expand Down
3 changes: 3 additions & 0 deletions example/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ export default defineConfig({
mock: { productionEnabled: true },
}),
],
esbuild: {
jsxInject: "import * as React from 'react'",
},
});

0 comments on commit 836a4e2

Please sign in to comment.