feat(login): add redirect parameter to login links for better user experience
This commit is contained in:
@@ -40,7 +40,13 @@ function Content({ matchedCity, name, logged }) {
|
||||
{isLogged ? (
|
||||
<ProfileUser />
|
||||
) : (
|
||||
<Link href="/login">
|
||||
<Link
|
||||
href={
|
||||
pathname && pathname !== "/login"
|
||||
? `/login?redirect=${encodeURIComponent(pathname)}`
|
||||
: "/login"
|
||||
}
|
||||
>
|
||||
<Button variant="outlined" color="primary">
|
||||
ورود | ثبت نام
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user