plane/apps/app/pages/installations/[provider]/index.tsx
Aaryan Khandelwal 3c2f5d12ed
feat: themes (#902)
* chore: add next theme and initial setup

* chore: add dark mode colors to layouts

* chore: user general setting page theming

* chore: dashboard theming

* chore: project page theming

* chore: workspace setting page theming

* chore: my issue page theming

* chore: cmdk theming

* chore: change hardcode bg and text color to theme

* chore: change color name according to the design

* style: fix card in the dashboard

* style: fix merge conflict design issues

* style: add light high contrast and dark high contrast

* style: fix cmd k menu color and selection

* feat: change theme from cmdk menu

* chore: add multiple theme field to custom theme

* chore: removed custom theming

* fix: build error

---------

Co-authored-by: Saheb Giri <iamsahebgiri@gmail.com>
2023-04-20 13:41:24 +05:30

52 lines
1.2 KiB
TypeScript

import React, { useEffect } from "react";
// services
import appinstallationsService from "services/app-installations.service";
// components
import { Spinner } from "components/ui";
interface IGithuPostInstallationProps {
installation_id: string;
setup_action: string;
state: string;
provider: string;
}
// TODO:Change getServerSideProps to router.query
const AppPostInstallation = ({
installation_id,
setup_action,
state,
provider,
}: IGithuPostInstallationProps) => {
useEffect(() => {
if (state && installation_id) {
appinstallationsService
.addGithubApp(state, provider, { installation_id })
.then((res) => {
window.opener = null;
window.open("", "_self");
window.close();
})
.catch((err) => {
console.log(err);
});
}
}, [state, installation_id, provider]);
return (
<div className="absolute top-0 left-0 z-50 flex h-full w-full flex-col items-center justify-center gap-y-3 bg-brand-surface-2">
<h2 className="text-2xl text-brand-base">Installing. Please wait...</h2>
<Spinner />
</div>
);
};
export async function getServerSideProps(context: any) {
return {
props: context.query,
};
}
export default AppPostInstallation;