Add TypeScript types for App component

This commit is contained in:
2025-04-15 20:00:20 +02:00
parent e4fb276cf7
commit 46e4897881
4 changed files with 13 additions and 5 deletions

1
app/package-lock.json generated
View File

@@ -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",

View File

@@ -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",

View File

@@ -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;

View File

@@ -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 />