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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__core": "^7.20.5",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/react": "^18.3.20",
|
||||
"@types/react-dom": "^18.3.6",
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
"unist-util-visit": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__core": "^7.20.5",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/react": "^18.3.20",
|
||||
"@types/react-dom": "^18.3.6",
|
||||
|
||||
@@ -11,7 +11,9 @@ import '@mantine/core/styles.css';
|
||||
import '@mantine/notifications/styles.css';
|
||||
import './App.scss';
|
||||
|
||||
function AuthenticatedContent() {
|
||||
interface AuthenticatedContentProps {}
|
||||
|
||||
const AuthenticatedContent: React.FC<AuthenticatedContentProps> = () => {
|
||||
const { user, loading, initialized } = useAuth();
|
||||
|
||||
if (!initialized) {
|
||||
@@ -33,9 +35,11 @@ function AuthenticatedContent() {
|
||||
</ModalProvider>
|
||||
</WorkspaceProvider>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function App() {
|
||||
interface AppProps {}
|
||||
|
||||
const App: React.FC<AppProps> = () => {
|
||||
return (
|
||||
<>
|
||||
<ColorSchemeScript defaultColorScheme="light" />
|
||||
@@ -49,6 +53,6 @@ function App() {
|
||||
</MantineProvider>
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default App;
|
||||
@@ -2,7 +2,9 @@ import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
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(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
Reference in New Issue
Block a user