Skip to content
Snippets Groups Projects
Commit 29074d4d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

open page with another map if other map is available

parent 08cc1930
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!204Resolve "[MIN-320] opening project without permission"
......@@ -36,6 +36,10 @@ export const AccessDeniedModal: React.FC = () => {
window.location.href = `mailto:${adminEmail}`;
};
const openProject = (e: React.FormEvent<HTMLButtonElement>): void => {
window.location.href = `?id=${e.currentTarget.value}`;
};
return (
<div className="w-[400px] border border-t-[#E1E0E6] bg-white p-[24px]">
{isAnonymousLogin && (
......@@ -56,7 +60,24 @@ export const AccessDeniedModal: React.FC = () => {
</div>
</div>
)}
{isProjectsAvailable && <div>Switch to another map</div>}
{isProjectsAvailable && (
<div>
<div className="mb-1 mt-5 text-sm">Switch to another map</div>
<div className="grid grid-cols-3 gap-2">
{projects.map(project => (
<Button
key={project.projectId}
value={project.projectId}
variantStyles="ghost"
className="text-center text-gray-500"
onClick={openProject}
>
{project.name} ({project.projectId})
</Button>
))}
</div>
</div>
)}
{isAdminEmail && (
<div className="mt-1 text-center">
<Button
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment