Commit 78517db3 authored by BBeretta's avatar BBeretta

feat/language-translation (back language selection from the header)

parent a485ada6
Pipeline #27831 canceled with stages
in 2 minutes and 24 seconds
import { App, Avatar, Dropdown } from "antd"; import { App, Avatar, Dropdown } from "antd";
import classNames from "classnames"; import classNames from "classnames";
import React, { useEffect } from "react"; import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { import {
type LoaderFunction, type LoaderFunction,
...@@ -75,7 +75,6 @@ export const Component = () => { ...@@ -75,7 +75,6 @@ export const Component = () => {
const { pathname } = routerLocation; const { pathname } = routerLocation;
const pathnamesHideHeader = ["/waitroom", "/duel", "/side"]; const pathnamesHideHeader = ["/waitroom", "/duel", "/side"];
const { modal } = App.useApp(); const { modal } = App.useApp();
const callbackUrl = `${location.origin}/match/`; const callbackUrl = `${location.origin}/match/`;
const onLogin = () => location.replace(getSSOSignInUrl(callbackUrl)); const onLogin = () => location.replace(getSSOSignInUrl(callbackUrl));
const onLogout = () => { const onLogout = () => {
...@@ -110,6 +109,7 @@ export const Component = () => { ...@@ -110,6 +109,7 @@ export const Component = () => {
</HeaderBtn> </HeaderBtn>
<span style={{ flexGrow: 1 }} /> <span style={{ flexGrow: 1 }} />
<span className={styles.profile}> <span className={styles.profile}>
{location.pathname === "/" && <I18NSelector />}
<Dropdown <Dropdown
arrow arrow
menu={{ menu={{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment