mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 11:59:11 +00:00
24 lines
644 B
TypeScript
24 lines
644 B
TypeScript
import * as React from 'react';
|
|
import { Title } from '../../utils/metaTitle';
|
|
|
|
const NewSession = () => {
|
|
React.useEffect(() => {
|
|
const url = new URL(window.location.href);
|
|
const id = url.searchParams.get('session_id');
|
|
if (id) {
|
|
localStorage.setItem('rp_session_key', id);
|
|
|
|
const redirectUrl = localStorage.getItem('rp_postauth_redirect');
|
|
window.location.href = redirectUrl || '/';
|
|
}
|
|
});
|
|
|
|
return (
|
|
<>
|
|
<Title title="Logging you into Roleypoly..." />
|
|
<div>Redirecting you...</div>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default NewSession;
|