mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-29 06:43:17 -05:00
closes #278
This commit is contained in:
@@ -23,6 +23,7 @@ import { FiEdit } from "react-icons/fi";
|
||||
import { RiTShirtLine } from "react-icons/ri";
|
||||
import useSWR from "swr";
|
||||
import { GANBA_DISCORD_ID } from "utils/constants";
|
||||
import { isCustomUrl } from "utils/validators/profile";
|
||||
|
||||
interface Props {
|
||||
user: GetUserByIdentifierData;
|
||||
@@ -65,6 +66,12 @@ const ProfilePage = (props: Props) => {
|
||||
setBuildToEdit(true);
|
||||
}, [canPostBuilds()]);
|
||||
|
||||
useEffect(() => {
|
||||
const identifier = window.location.pathname.split("/")[2];
|
||||
if (isCustomUrl(identifier) || !user.profile?.customUrlPath) return;
|
||||
history.replaceState({}, "", `/u/${user.profile.customUrlPath}`);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
{showProfileModal && (
|
||||
|
||||
Reference in New Issue
Block a user