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