Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Fix/typings improvements (#183)
Browse files Browse the repository at this point in the history
* Add typings

* Fix possible nulls

* Add LoginGridProps type

* Fix possible null

* remove breaklines

* Add export

* Add import
  • Loading branch information
EstebanDalelR committed Aug 1, 2023
1 parent 82508a2 commit 5bbccde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
"use client";
import Image from "next/image";
import HeaderSignOut from "./HeaderSignOut";
export default function Header({ userEmail, userToken }) {
import { useSession, signOut } from "next-auth/react";
import { useEffect, useState } from "react";
export default function Header() {
const [userEmail, setUserEmail] = useState<string | null | undefined>(null);
const { data } = useSession();

useEffect(() => {
setUserEmail(data?.user?.email);
}, [data]);
return (
<div className="Header d-flex flex-items-center flex-justify-between">
<a href="/" className="Header-link">
Expand Down Expand Up @@ -41,7 +48,7 @@ export default function Header({ userEmail, userToken }) {
className="dropdown-item"
href={`vscode://watermelontools.watermelon-tools?email=${
userEmail ?? ""
}&token=${userToken ? userToken : ""}`}
}&token=${data?.user?.name ? data.user.name : ""}`}
>
VSCode Extension
</a>
Expand Down
1 change: 1 addition & 0 deletions pages/api/actions/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import githubMarkdown from "../../../utils/actions/markdownHelpers/github";
import jiraMarkdown from "../../../utils/actions/markdownHelpers/jira";
import slackMarkdown from "../../../utils/actions/markdownHelpers/slack";
import notionMarkdown from "../../../utils/actions/markdownHelpers/notion";
import countMarkdown from "../../../utils/actions/markdownHelpers/count";

const app = new App({
appId: process.env.GITHUB_APP_ID,
Expand Down

0 comments on commit 5bbccde

Please sign in to comment.