From c2c57b943664c3844dd28abaea1e956d800fb624 Mon Sep 17 00:00:00 2001 From: Henrique GC Date: Tue, 21 Feb 2023 21:27:34 -0300 Subject: [PATCH 1/4] fix: changing publish access to public in tsconfig micro service --- packages/tsconfig/package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index b960f2e..dfb892e 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,7 +1,9 @@ { "name": "@pizy/tsconfig", "version": "0.0.1", - "private": true, + "publishConfig": { + "access": "public" + }, "files": [ "base.json", "next.json" From 5de8d1941ee526bfd49419bab6ffc96c3b5acf95 Mon Sep 17 00:00:00 2001 From: Henrique GC Date: Tue, 21 Feb 2023 21:28:04 -0300 Subject: [PATCH 2/4] fix: comment types --- apps/web/package.json | 2 +- .../Buttons/Glassmorphism/index.tsx | 8 +- apps/web/src/components/Buttons/index.tsx | 4 +- apps/web/src/components/Footer/index.tsx | 40 +++++---- apps/web/src/components/Header/index.tsx | 12 +-- apps/web/src/components/Header/styles.ts | 8 +- apps/web/src/contexts/AuthContext.tsx | 8 +- apps/web/src/pages/blog/index.tsx | 42 +++++----- apps/web/src/pages/index.tsx | 84 +++++++++---------- apps/web/src/pages/members/index.tsx | 32 +++---- apps/web/src/pages/projects.tsx | 8 +- apps/web/src/pages/user/[username].tsx | 58 +++++++------ 12 files changed, 170 insertions(+), 136 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index f4fbc78..47cfd3d 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -23,7 +23,7 @@ "styled-components": "^5.3.5" }, "devDependencies": { - "@pizy/tsconfig": "workspace*", + "@pizy/tsconfig": "workspace:*", "@types/node": "18.7.16", "@types/react": "18.0.19", "typescript": "^4.9.5" diff --git a/apps/web/src/components/Buttons/Glassmorphism/index.tsx b/apps/web/src/components/Buttons/Glassmorphism/index.tsx index 77ab548..cdb51aa 100644 --- a/apps/web/src/components/Buttons/Glassmorphism/index.tsx +++ b/apps/web/src/components/Buttons/Glassmorphism/index.tsx @@ -1,5 +1,11 @@ +import { ReactNode } from "react"; + import { GlassButton } from "./styles"; -export default function GlassmorphismButton({ children }) { +export default function GlassmorphismButton({ + children, +}: { + children: ReactNode; +}) { return {children}; } diff --git a/apps/web/src/components/Buttons/index.tsx b/apps/web/src/components/Buttons/index.tsx index e8331c8..6bfdd8c 100644 --- a/apps/web/src/components/Buttons/index.tsx +++ b/apps/web/src/components/Buttons/index.tsx @@ -1,5 +1,7 @@ +import { ReactNode } from "react"; + import { ButtonContainer } from "./styles"; -export default function Button({ children }) { +export default function Button({ children }: { children: ReactNode }) { return {children}; } diff --git a/apps/web/src/components/Footer/index.tsx b/apps/web/src/components/Footer/index.tsx index 2f2d50c..bf70ba9 100644 --- a/apps/web/src/components/Footer/index.tsx +++ b/apps/web/src/components/Footer/index.tsx @@ -21,6 +21,10 @@ export default function Header() { } = user; const getGitHubData = async () => { + if (!user.photoURL) { + return; + } + const response = await axios.get( `https://api.github.com/user/${ user.photoURL @@ -51,23 +55,23 @@ export default function Header() { }; }, []); - useEffect(() => { - try { - const projectsDb = () => - db - .collection("projects") - .get() - .then(response => { - setProjects( - response.docs.map(doc => ({ ...doc.data(), id: doc.id })), - ); - }); + // useEffect(() => { + // try { + // const projectsDb = () => + // db + // .collection("projects") + // .get() + // .then(response => { + // return setProjects( + // response.docs.map(doc => ({ ...doc.data(), id: doc.id })), + // ); + // }); - projectsDb(); - } catch (error) { - console.log(error); - } - }, []); + // projectsDb(); + // } catch (error) { + // console.log(error); + // } + // }, []); const year = new Date().getFullYear(); @@ -132,7 +136,7 @@ export default function Header() { {projects && projects.length > 0 && (
Feitos pela PIZY -
    + {/*
      {projects.slice(0, 4).map(project => ( ))} -
    +
*/}
)} diff --git a/apps/web/src/components/Header/index.tsx b/apps/web/src/components/Header/index.tsx index a6b75b8..72187ad 100644 --- a/apps/web/src/components/Header/index.tsx +++ b/apps/web/src/components/Header/index.tsx @@ -70,6 +70,8 @@ export default function Header(props: HeaderProps) { } = user; const getGitHubData = async () => { + if (!user.photoURL) return; + const response = await axios.get( `https://api.github.com/user/${ user.photoURL @@ -108,7 +110,7 @@ export default function Header(props: HeaderProps) { PIZY Group - */}