import React from 'react';
import { Redirect, Route } from 'react-router-dom';
import { getStoredPath, clearStoredPath, getStoredExternalPath, clearStoredExternalPath } from '../redirect';
const AadCallback = () => {
    const localUrl = getStoredPath();
    const externalUrl = getStoredExternalPath();
    clearStoredPath();
    clearStoredExternalPath();
    if (externalUrl) {
        return (React.createElement(Route, { component: () => {
                window.location.href = externalUrl;
                return null;
            } }));
    }
    return React.createElement(Redirect, { to: localUrl === '/aad_callback' ? '/' : localUrl });
};
export default AadCallback;
//# sourceMappingURL=AadCallback.js.map