Merge pull request #887 from toeverything/fix-remove-unused-code
fix: remove unused code
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
export const AlreadyJoined = () => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<p>
|
|
||||||
You are already a member of <code>Workspace name</code>
|
|
||||||
</p>
|
|
||||||
<button>Open Workspace</button>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
export const Confirm = () => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<p>Inviter name</p>
|
|
||||||
<p>
|
|
||||||
invite you to join in <code>Workspace name</code>
|
|
||||||
</p>
|
|
||||||
<button>Join</button>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
export const LinkExpired = () => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<h1>The current invitation link has expired.</h1>
|
|
||||||
<a href={location.origin}>Back to home</a>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
import { useRouter } from 'next/router';
|
|
||||||
import { AlreadyJoined } from './AlreadyJoined';
|
|
||||||
import { Confirm } from './Confirm';
|
|
||||||
import { LinkExpired } from './LinkExpired';
|
|
||||||
|
|
||||||
export const ConfirmInvitation = () => {
|
|
||||||
const router = useRouter();
|
|
||||||
// Temporary code. The code should be returned by request.
|
|
||||||
const { code } = router.query;
|
|
||||||
const Component = {
|
|
||||||
'-1': LinkExpired,
|
|
||||||
0: Confirm,
|
|
||||||
1: AlreadyJoined,
|
|
||||||
}[code as string];
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<h1>Confirm Invitation</h1>
|
|
||||||
{Component ? <Component /> : null}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import type { NextPage } from 'next';
|
|
||||||
import { ConfirmInvitation } from '../pages-content/ConfirmInvitationPage';
|
|
||||||
|
|
||||||
const ConfirmInvitationPage: NextPage = () => {
|
|
||||||
return <ConfirmInvitation />;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default ConfirmInvitationPage;
|
|
||||||
Reference in New Issue
Block a user