-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate repo to TypeScript #4
base: dev
Are you sure you want to change the base?
Conversation
src/app/layout.tsx
Outdated
@@ -10,7 +10,11 @@ export const metadata = { | |||
description: "Firebase Setup Integration with Next.js", | |||
}; | |||
|
|||
export default function RootLayout({ children }) { | |||
type Props = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- use interface
- lowercase props
src/utils/api.ts
Outdated
@@ -0,0 +1,21 @@ | |||
type Body = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- interface
- all lowercase
src/utils/firebase.ts
Outdated
@@ -1,7 +1,16 @@ | |||
import { initializeApp } from "firebase/app"; | |||
import { getFirestore } from "firebase/firestore"; | |||
|
|||
const firebaseConfig = { | |||
type Config = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- interface
- lowercase
- check to see if firebase alr has a config type u can use
src/utils/api.ts
Outdated
email: string; | ||
} | ||
|
||
interface apifunc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should just be called request
src/utils/api.ts
Outdated
@@ -0,0 +1,21 @@ | |||
interface body { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
body should be defined by some HTML/JS generated thing or not at all, this is a general API wrapper so we cant conform to just the name and email
tsconfig.json
Outdated
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strict should be true
No description provided.