mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 15:44:21 +00:00
Add TypeScript types for App component
This commit is contained in:
1
app/package-lock.json
generated
1
app/package-lock.json
generated
@@ -36,6 +36,7 @@
|
|||||||
"unist-util-visit": "^5.0.0"
|
"unist-util-visit": "^5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/babel__core": "^7.20.5",
|
||||||
"@types/node": "^22.14.0",
|
"@types/node": "^22.14.0",
|
||||||
"@types/react": "^18.3.20",
|
"@types/react": "^18.3.20",
|
||||||
"@types/react-dom": "^18.3.6",
|
"@types/react-dom": "^18.3.6",
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
"unist-util-visit": "^5.0.0"
|
"unist-util-visit": "^5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/babel__core": "^7.20.5",
|
||||||
"@types/node": "^22.14.0",
|
"@types/node": "^22.14.0",
|
||||||
"@types/react": "^18.3.20",
|
"@types/react": "^18.3.20",
|
||||||
"@types/react-dom": "^18.3.6",
|
"@types/react-dom": "^18.3.6",
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ import '@mantine/core/styles.css';
|
|||||||
import '@mantine/notifications/styles.css';
|
import '@mantine/notifications/styles.css';
|
||||||
import './App.scss';
|
import './App.scss';
|
||||||
|
|
||||||
function AuthenticatedContent() {
|
interface AuthenticatedContentProps {}
|
||||||
|
|
||||||
|
const AuthenticatedContent: React.FC<AuthenticatedContentProps> = () => {
|
||||||
const { user, loading, initialized } = useAuth();
|
const { user, loading, initialized } = useAuth();
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
@@ -33,9 +35,11 @@ function AuthenticatedContent() {
|
|||||||
</ModalProvider>
|
</ModalProvider>
|
||||||
</WorkspaceProvider>
|
</WorkspaceProvider>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
function App() {
|
interface AppProps {}
|
||||||
|
|
||||||
|
const App: React.FC<AppProps> = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ColorSchemeScript defaultColorScheme="light" />
|
<ColorSchemeScript defaultColorScheme="light" />
|
||||||
@@ -49,6 +53,6 @@ function App() {
|
|||||||
</MantineProvider>
|
</MantineProvider>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
@@ -2,7 +2,9 @@ import React from 'react';
|
|||||||
import ReactDOM from 'react-dom/client';
|
import ReactDOM from 'react-dom/client';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
const root = ReactDOM.createRoot(document.getElementById('root'));
|
const rootElement = document.getElementById('root') as HTMLElement;
|
||||||
|
const root = ReactDOM.createRoot(rootElement);
|
||||||
|
|
||||||
root.render(
|
root.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<App />
|
<App />
|
||||||
Reference in New Issue
Block a user