mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 17:19:10 +00:00
feat: bot-join machinery redirect
This commit is contained in:
parent
ab3f718e6d
commit
d39b9db781
1 changed files with 16 additions and 33 deletions
|
@ -1,36 +1,19 @@
|
||||||
import { navigate } from '@reach/router';
|
import { GenericLoadingTemplate } from '@roleypoly/design-system/templates/generic-loading';
|
||||||
import { Button } from '@roleypoly/design-system/atoms/button';
|
import * as React from 'react';
|
||||||
import { Hero } from '@roleypoly/design-system/atoms/hero';
|
import { useApiContext } from '../../contexts/api/ApiContext';
|
||||||
import { Space } from '@roleypoly/design-system/atoms/space';
|
|
||||||
import { Link } from '@roleypoly/design-system/atoms/typography';
|
|
||||||
import { GoArrowLeft } from 'react-icons/go';
|
|
||||||
|
|
||||||
const BotJoin = () => (
|
const BotJoin = (props: { serverID: string; path: string }) => {
|
||||||
<Hero>
|
const { apiUrl } = useApiContext();
|
||||||
<div>
|
let params = '';
|
||||||
Hey. Thanks for taking an interest in Roleypoly.
|
if (props.serverID) {
|
||||||
<br />
|
params = `?guild=${props.serverID}`;
|
||||||
Right now, we're not allowing you to add the Roleypoly Next closed beta bot to any
|
}
|
||||||
servers.
|
|
||||||
<br />
|
React.useEffect(() => {
|
||||||
Please keep an eye on{' '}
|
window.location.href = `${apiUrl}/bot-join${params}`;
|
||||||
<Link href={'https://discord.com/channels/386659935687147521/790741820173844530'}>
|
}, [apiUrl, params]);
|
||||||
#next-testers
|
|
||||||
</Link>{' '}
|
return <GenericLoadingTemplate />;
|
||||||
for when we're ready.
|
};
|
||||||
<Space />
|
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
navigate(-1);
|
|
||||||
}}
|
|
||||||
color="muted"
|
|
||||||
size="small"
|
|
||||||
icon={<GoArrowLeft />}
|
|
||||||
>
|
|
||||||
Go back
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</Hero>
|
|
||||||
);
|
|
||||||
|
|
||||||
export default BotJoin;
|
export default BotJoin;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue