20 lines
482 B
Plaintext
20 lines
482 B
Plaintext
---
|
|
import { changeLanguage } from "i18next";
|
|
import moment from "moment";
|
|
import LoginView from "../../components/LoginView.svelte";
|
|
import Layout from "../../layouts/Layout.astro";
|
|
|
|
changeLanguage("fr");
|
|
|
|
const token = Astro.cookies.get("token").value;
|
|
const expires = Astro.cookies.get("expires").number();
|
|
const now = moment().unix();
|
|
if (token && now < expires) {
|
|
return Astro.redirect(`/user`);
|
|
}
|
|
---
|
|
|
|
<Layout title="Login">
|
|
<LoginView client:only></LoginView>
|
|
</Layout>
|