-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: clean up ts warnings and errors
- Loading branch information
1 parent
710a472
commit 2602ed8
Showing
29 changed files
with
141 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,86 @@ | ||
import React from "react"; | ||
import { Button } from "@mantine/core"; | ||
import { AppState } from "@vexilla/types"; | ||
// import _React from "react"; | ||
// import { Button } from "@mantine/core"; | ||
// import { AppState } from "@vexilla/types"; | ||
|
||
import { GithubLogo } from "../../logos/GithubLogo"; | ||
// import { GithubLogo } from "../../logos/GithubLogo"; | ||
|
||
import { Icon } from "@iconify/react"; | ||
import verifiedCheckBold from "@iconify/icons-solar/verified-check-bold"; | ||
// import { Icon } from "@iconify/react"; | ||
// import verifiedCheckBold from "@iconify/icons-solar/verified-check-bold"; | ||
|
||
const githubAppName = `vexilla-dev`; | ||
// const githubAppName = `vexilla`; | ||
// const githubAppName = `vexilla-dev`; | ||
// // const githubAppName = `vexilla`; | ||
|
||
interface S3FormProps { | ||
config: AppState; | ||
} | ||
// interface S3FormProps { | ||
// config: AppState; | ||
// } | ||
|
||
const buttonStyling = { backgroundColor: "black", color: "white" }; | ||
const disabledButtonStyling = { | ||
backgroundColor: "black", | ||
color: "white", | ||
opacity: 0.6, | ||
}; | ||
// const buttonStyling = { backgroundColor: "black", color: "white" }; | ||
// const disabledButtonStyling = { | ||
// backgroundColor: "black", | ||
// color: "white", | ||
// opacity: 0.6, | ||
// }; | ||
|
||
export function GithubForm({ config }: S3FormProps) { | ||
return ( | ||
<div> | ||
<h2>Installation</h2> | ||
<p>The app must be installed into a repo via the Github marketplace.</p> | ||
{!config.hosting?.config.installationId && ( | ||
<Button | ||
style={buttonStyling} | ||
leftIcon={<GithubLogo />} | ||
onClick={() => { | ||
window.location.href = `https://github.com/apps/${githubAppName}/installations/new`; | ||
}} | ||
> | ||
Install | ||
</Button> | ||
)} | ||
// export function GithubForm({ config }: S3FormProps) { | ||
// return ( | ||
// <div> | ||
// <h2>Installation</h2> | ||
// <p>The app must be installed into a repo via the Github marketplace.</p> | ||
// {!config.hosting?.config.installationId && ( | ||
// <Button | ||
// style={buttonStyling} | ||
// leftIcon={<GithubLogo />} | ||
// onClick={() => { | ||
// window.location.href = `https://github.com/apps/${githubAppName}/installations/new`; | ||
// }} | ||
// > | ||
// Install | ||
// </Button> | ||
// )} | ||
|
||
{!!config.hosting?.config.installationId && ( | ||
<Button | ||
variant="outline" | ||
style={disabledButtonStyling} | ||
leftIcon={<GithubLogo />} | ||
rightIcon={<Icon width={20} icon={verifiedCheckBold} color="green" />} | ||
disabled | ||
> | ||
Installed | ||
</Button> | ||
)} | ||
// {!!config.hosting?.config.installationId && ( | ||
// <Button | ||
// variant="outline" | ||
// style={disabledButtonStyling} | ||
// leftIcon={<GithubLogo />} | ||
// rightIcon={<Icon width={20} icon={verifiedCheckBold} color="green" />} | ||
// disabled | ||
// > | ||
// Installed | ||
// </Button> | ||
// )} | ||
|
||
<h2>Login</h2> | ||
<p> | ||
You need to login via Github so that the app can make PRs on your | ||
behalf. | ||
</p> | ||
// <h2>Login</h2> | ||
// <p> | ||
// You need to login via Github so that the app can make PRs on your | ||
// behalf. | ||
// </p> | ||
|
||
{!config.hosting?.config.accessToken && ( | ||
<Button | ||
style={buttonStyling} | ||
leftIcon={<GithubLogo />} | ||
onClick={() => { | ||
window.location.href = `https://github.com/login/oauth/authorize?client_id=${githubClientId}&redirect_uri=${encodeURIComponent( | ||
`${baseAuthCallbackUrl}/github` | ||
)}`; | ||
}} | ||
> | ||
Login | ||
</Button> | ||
)} | ||
// {!config.hosting?.config.accessToken && ( | ||
// <Button | ||
// style={buttonStyling} | ||
// leftIcon={<GithubLogo />} | ||
// onClick={() => { | ||
// window.location.href = `https://github.com/login/oauth/authorize?client_id=${githubClientId}&redirect_uri=${encodeURIComponent( | ||
// `${baseAuthCallbackUrl}/github` | ||
// )}`; | ||
// }} | ||
// > | ||
// Login | ||
// </Button> | ||
// )} | ||
|
||
{!!config.hosting?.config.accessToken && ( | ||
<Button | ||
style={disabledButtonStyling} | ||
variant="outline" | ||
leftIcon={<GithubLogo />} | ||
rightIcon={<Icon width={20} icon={verifiedCheckBold} color="green" />} | ||
disabled | ||
> | ||
Logged in | ||
</Button> | ||
)} | ||
</div> | ||
); | ||
} | ||
// {!!config.hosting?.config.accessToken && ( | ||
// <Button | ||
// style={disabledButtonStyling} | ||
// variant="outline" | ||
// leftIcon={<GithubLogo />} | ||
// rightIcon={<Icon width={20} icon={verifiedCheckBold} color="green" />} | ||
// disabled | ||
// > | ||
// Logged in | ||
// </Button> | ||
// )} | ||
// </div> | ||
// ); | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import React from "react"; | ||
import _React from "react"; | ||
import { AppState } from "@vexilla/types"; | ||
|
||
interface EmptyFormProps { | ||
config: AppState; | ||
} | ||
|
||
export function EmptyForm({ config }: EmptyFormProps) { | ||
export function EmptyForm({}: EmptyFormProps) { | ||
return <div>Empty Form</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.