3 Commits

Author SHA1 Message Date
32f2edd7fc chore(release): 1.0.1 [skip ci] 2022-04-08 23:12:58 +00:00
4799acbc29 fix: update API to v1.0.1 2022-04-09 01:09:53 +02:00
0d6aa0a78f fix: missing translation for "Create a channel" 2022-04-09 01:03:15 +02:00
9 changed files with 18 additions and 13 deletions

View File

@ -18,7 +18,7 @@
Thream's website to stay close with your friends and communities.
It uses [Thream/api](https://github.com/Thream/api) [v1.0.0](https://github.com/Thream/api/releases/tag/v1.0.0).
It uses [Thream/api](https://github.com/Thream/api) [v1.0.1](https://github.com/Thream/api/releases/tag/v1.0.1).
## ⚙️ Getting Started

View File

@ -84,7 +84,10 @@ export const UserSettings: React.FC = () => {
return {
...oldUser,
...userCurrentData,
settings: userCurrentSettings.settings
settings: {
...oldUser.settings,
...userCurrentSettings.settings
}
}
})
return {

View File

@ -2,6 +2,7 @@
"website": "Website",
"create": "Create",
"status": "Status",
"create-a-channel": "Create a channel",
"create-a-guild": "Create a Guild",
"create-a-guild-description": "Create your own guild and manage everything.",
"join-a-guild": "Join a Guild",

View File

@ -2,6 +2,7 @@
"website": "Site web",
"create": "Créer",
"status": "Statut",
"create-a-channel": "Créer un channel",
"create-a-guild": "Créer une Guilde",
"create-a-guild-description": "Créez votre propre guilde et gérez tout.",
"join-a-guild": "Rejoindre une Guilde",

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@thream/website",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@thream/website",
"version": "1.0.0",
"version": "1.0.1",
"hasInstallScript": true,
"dependencies": {
"@fontsource/montserrat": "4.5.7",

View File

@ -1,6 +1,6 @@
{
"name": "@thream/website",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"repository": {
"type": "git",

View File

@ -1,4 +1,5 @@
import { NextPage } from 'next'
import useTranslation from 'next-translate/useTranslation'
import { Head } from '../../../../components/Head'
import { Application } from '../../../../components/Application'
@ -21,6 +22,7 @@ export interface CreateChannelPageProps extends PagePropsWithAuthentication {
const CreateChannelPage: NextPage<CreateChannelPageProps> = (props) => {
const { guildId, authentication, guildMember } = props
const { t } = useTranslation()
const path = { guildId }
@ -29,10 +31,10 @@ const CreateChannelPage: NextPage<CreateChannelPageProps> = (props) => {
<GuildsProvider>
<GuildMemberProvider guildMember={guildMember} path={path}>
<Head
title={`Thream | Crée un channel`}
description={'Crée un nouveau channel'}
title={`Thream | ${t('application:create-a-channel')}`}
description={t('application:create-a-channel')}
/>
<Application path={path} title={'Crée un channel'}>
<Application path={path} title={t('application:create-a-channel')}>
<CreateChannel />
</Application>
</GuildMemberProvider>

View File

@ -1,6 +1,6 @@
import axios from 'axios'
export const API_VERSION = '1.0.0'
export const API_VERSION = '1.0.1'
export const API_DEFAULT_PORT = 8080

View File

@ -5,7 +5,6 @@ import useTranslation from 'next-translate/useTranslation'
import { Authentication, PagePropsWithAuthentication } from '.'
import { UserCurrent } from '../../models/User'
import { Language, Theme } from '../../models/UserSettings'
export interface AuthenticationValue {
authentication: Authentication
@ -41,14 +40,13 @@ export const AuthenticationProvider: React.FC<PagePropsWithAuthentication> = (
useEffect(() => {
authentication.api
.put('/users/current/settings', { theme, language: lang })
.then(() => {
.then(({ data: userCurrentSettings }) => {
setUser((oldUser) => {
return {
...oldUser,
settings: {
...oldUser.settings,
theme: theme as Theme,
language: lang as Language
...userCurrentSettings.settings
}
}
})