feat: better redirection when switching account

This commit is contained in:
DIYgod
2022-10-06 18:33:20 +01:00
parent 4b51535858
commit 5dec030453
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export function DashboardLayout({
}
if (userSite.isSuccess && subdomain) {
if (!userSite.data?.find((site) => site.username === subdomain)) {
router.push("/")
router.push("/dashboard")
}
}
}, [address, router, userSite.isSuccess, userSite.data, subdomain])
+1 -2
View File
@@ -3,7 +3,6 @@ import { UniLink } from "../ui/UniLink"
import { Profile, Note } from "~/lib/types"
import Script from "next/script"
import Image from "next/image"
import { getSiteLink } from "~/lib/helpers"
export const SiteFooter: React.FC<{
site?: Profile
@@ -21,7 +20,7 @@ export const SiteFooter: React.FC<{
· Powered by{" "}
<UniLink
href={SITE_URL}
className="hover:text-accent inline-flex items-center align-text-bottom ml-1"
className="hover:text-accent inline-flex items-center align-text-top ml-1"
>
<Image
alt={APP_NAME}