diff --git a/firebaseFunctions.js b/firebaseFunctions.js index 39a0746..f48112b 100644 --- a/firebaseFunctions.js +++ b/firebaseFunctions.js @@ -1,17 +1,17 @@ -const { join } = require('path') -const { https } = require('firebase-functions') -const { default: next } = require('next') +const { join } = require("path"); +const { https } = require("firebase-functions"); +const { default: next } = require("next"); -const nextjsDistDir = join('src', require('./src/next.config.js').distDir) +const nextjsDistDir = join("src", require("./src/next.config.js").distDir); const nextjsServer = next({ dev: false, conf: { distDir: nextjsDistDir, }, -}) -const nextjsHandle = nextjsServer.getRequestHandler() +}); +const nextjsHandle = nextjsServer.getRequestHandler(); exports.nextjsFunc = https.onRequest((req, res) => { - return nextjsServer.prepare().then(() => nextjsHandle(req, res)) -}) \ No newline at end of file + return nextjsServer.prepare().then(() => nextjsHandle(req, res)); +}); diff --git a/package.json b/package.json index e9756e9..7d2002e 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.11.2", "@mui/styles": "^5.0.1", + "@types/react-dom": "^17.0.11", "firebase": "^8.9.1", "firebase-admin": "^9.4.2", "firebase-functions": "^3.13.1", @@ -27,12 +28,16 @@ "react-select": "^4.3.1", "recoil": "^0.4.1", "styled-components": "^5.3.0", - "swiper": "^6.8.2" + "swiper": "^6.8.2", + "yarn": "^1.22.17" }, "devDependencies": { + "@types/node": "^16.11.12", + "@types/react": "^17.0.37", "babel-plugin-styled-components": "^1.13.3", "firebase-functions-test": "^0.2.3", - "firebase-tools": "^9.3.0" + "firebase-tools": "^9.3.0", + "typescript": "^4.5.3" }, "license": "MIT", "volta": { diff --git a/src/Auth.jsx b/src/Auth.jsx deleted file mode 100644 index e69de29..0000000 diff --git a/src/Auth.tsx b/src/Auth.tsx new file mode 100644 index 0000000..af788e8 --- /dev/null +++ b/src/Auth.tsx @@ -0,0 +1,11 @@ +import React from 'react' + +function Auth() { + return ( +
+ +
+ ) +} + +export default Auth diff --git a/src/_app.js b/src/_app.js index 6dce8fe..294a539 100644 --- a/src/_app.js +++ b/src/_app.js @@ -13,3 +13,34 @@ const App = ({ Component, pageProps }) => { }; export default App; + +// import React from 'react' +// import { AppProps } from 'next/app' +// import Head from 'next/head' +// import { CssBaseline } from '@material-ui/core' +// import { ThemeProvider } from '@material-ui/core/styles' +// import theme from './theme' + +// export default function MyApp({ Component, pageProps }: AppProps): JSX.Element { +// React.useEffect(() => { +// // Remove the server-side injected CSS. +// const jssStyles = document.querySelector('#jss-server-side') +// jssStyles?.parentElement?.removeChild(jssStyles) +// }, []) + +// return ( +// <> +// +// MyApp +// +// +// +// +// +// +// +// ) +// } diff --git a/src/_document.js b/src/_document.js index 0b93bf0..3549ddf 100644 --- a/src/_document.js +++ b/src/_document.js @@ -8,7 +8,7 @@ import Document, { DocumentInitialProps, } from "next/document"; import createEmotionServer from "@emotion/server/create-instance"; -import theme from "../src/theme"; +import theme from "./theme"; import createEmotionCache from "../src/createEmotionCache"; import { ServerStyleSheet } from "styled-components"; diff --git a/src/components/App.jsx b/src/components/App.tsx similarity index 100% rename from src/components/App.jsx rename to src/components/App.tsx diff --git a/src/components/ApplyBusiness.jsx b/src/components/ApplyBusiness.tsx similarity index 100% rename from src/components/ApplyBusiness.jsx rename to src/components/ApplyBusiness.tsx diff --git a/src/components/BusinessCard.jsx b/src/components/BusinessCard.tsx similarity index 100% rename from src/components/BusinessCard.jsx rename to src/components/BusinessCard.tsx diff --git a/src/components/BusinessData.jsx b/src/components/BusinessData.tsx similarity index 100% rename from src/components/BusinessData.jsx rename to src/components/BusinessData.tsx diff --git a/src/components/BusinessInformation.jsx b/src/components/BusinessInformation.tsx similarity index 100% rename from src/components/BusinessInformation.jsx rename to src/components/BusinessInformation.tsx diff --git a/src/components/ChildModal.jsx b/src/components/ChildModal.tsx similarity index 100% rename from src/components/ChildModal.jsx rename to src/components/ChildModal.tsx diff --git a/src/components/Content.jsx b/src/components/Content.tsx similarity index 100% rename from src/components/Content.jsx rename to src/components/Content.tsx diff --git a/src/components/FavoBusiness.jsx b/src/components/FavoBusiness.tsx similarity index 100% rename from src/components/FavoBusiness.jsx rename to src/components/FavoBusiness.tsx diff --git a/src/components/Filetr.jsx b/src/components/Filetr.tsx similarity index 100% rename from src/components/Filetr.jsx rename to src/components/Filetr.tsx diff --git a/src/components/Footer.jsx b/src/components/Footer.tsx similarity index 91% rename from src/components/Footer.jsx rename to src/components/Footer.tsx index 2c8d8ef..bef7288 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.tsx @@ -9,7 +9,7 @@ import { Typography, } from "@material-ui/core"; -const Header = ({ pathname }) => ( +const Header = ({ pathname }:{pathname?:any}) => (