fix: rework branch naming updating to next 16
Squashed commit of the following: commit13fb596232Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Apr 2 12:59:26 2026 -0600 chore(deps): upgrade sharp to v0.34.5, add @types/bun, remove @types/node commit17be2f09ddAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Apr 2 12:49:47 2026 -0600 chore: add lint-staged with husky pre-commit hook for automated linting commitb4a28fb35eAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Apr 2 12:49:29 2026 -0600 chore: update husky hooks for latest version and use bun commit796c952890Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Apr 2 12:00:41 2026 -0600 build: add Dockerfile and .dockerignore for Next.js containerization commit166ac4350fAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Apr 2 11:59:44 2026 -0600 chore: moves next config to typescript Also adds DOCKER_BUILD env variable in prepare for moving out from github workflows commitea498588e0Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Apr 1 14:17:22 2026 -0600 chore(deps): bump date-fns from 3.3.1 to 4.1.0 commit3c66b5bad1Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Apr 1 14:16:31 2026 -0600 chore: update @pandacss/dev to v1.9.1 commit221034133dAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Apr 1 14:14:35 2026 -0600 chore: update husky and commitlint commit4be0de62fcAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Apr 1 14:07:57 2026 -0600 chore: update FontAwesome dependencies to v7.2.0 commitb595cba4b0Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Apr 1 14:01:16 2026 -0600 chore: update TypeScript module config to esnext and bundler commitb8454f750dAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Apr 1 13:51:25 2026 -0600 feat: add suspense loading state to recover password page commitd0f4a88661Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Apr 1 13:48:15 2026 -0600 refactor: enhance TypeScript typing and import consistency commit57a6032a24Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Apr 1 13:46:02 2026 -0600 chore: upgrade next and deps commitf8018048bcAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Jul 31 18:44:51 2024 -0600 fix: pm2 run with bun commitec196b2850Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Jul 31 18:35:29 2024 -0600 fix: deploy commit8802b0fd68Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Tue Jul 30 18:23:15 2024 -0600 feat: nextjs 14 (#20) * feat: eslint update * feat: start over and layout * feat: nextjs13 boilerplate * feat: static homepage * feat: static pages * feat: static unirse * chore: remove old mui types * chore: moving from yarn to bun * chore: update dependencies * feat: static equipo unirse * feat: move appwrite to entgamers-database package * feat: improve ui components * feat: update dependencies * feat: static login & register pages * fix: remove unused logs * feat: state redux toolkit & feedback slice * fix: equipo div inside p * feat: session * feat: metadataBase * feat: basic apply form * feat: http verbs * feat: recover password flow * chore: updated dependencies * fix: fix image config * fix: api team-applications route * fix: remove not longer used fonts * feat: session with current user * fix: login form recuperar contraseña * feat: equipo pages now uses data from database package * feat: useManageErrors hook * feat: updated cuenta page * chore: updated old formik forms to use hooks * feat: updated dependencies &package name * fix: session related bugs * fix: missing helper texts * feat: static applications dashboard * chore: update dependencies * refactor: team applications * fix: session api update commit14b52a7800Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Sep 14 21:15:53 2023 -0600 fix: remove bundle analyzer commitf11ae1c4f3Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Sep 14 21:08:33 2023 -0600 revert: revert to yarn to deploy commitf5a9a88f84Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Sep 14 14:52:25 2023 -0600 fix: pm2 script commitf59a7cc091Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Sep 14 14:49:04 2023 -0600 fix: interpreter to use pm2 2 commit3a831acaeeAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Sep 14 14:39:51 2023 -0600 fix: interpreter to use pm2 commitb514c6bc6fAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Sep 14 14:21:14 2023 -0600 fix: bun doesnt run on pm2 commitce87aa5ee3Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Sep 14 14:14:12 2023 -0600 feat: moving deployments to bun commitb26d5d8ebaAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Thu Sep 14 13:01:22 2023 -0600 chore: updated dependencies commit390f8bc858Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Tue Jul 11 15:46:34 2023 -0600 feat: riot review commitd926d3a5efAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Jan 4 15:47:45 2023 -0600 fix: github action name, wrong triggers commitfdefa84ec7Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Jan 4 15:46:14 2023 -0600 fix: github action naming commit9db5e5cebfAuthor: SrJuggernaut <jugger@srjuggernaut.dev> Date: Wed Jan 4 15:44:18 2023 -0600 feat: setup github action to run on new server commit35105441cbAuthor: Jugger <jugger@srjuggernaut.dev> Date: Sun Oct 9 13:56:41 2022 -0500 docs: deploy env vars commit7986456b9cAuthor: Jugger <jugger@srjuggernaut.dev> Date: Sun Oct 9 13:20:42 2022 -0500 fix: production git ref commitf9aea7eea4Author: Jugger <jugger@srjuggernaut.dev> Date: Sat Oct 1 13:34:31 2022 -0500 fix: glass text contrast commita68098e7e2Author: Jugger <jugger@srjuggernaut.dev> Date: Sat Oct 1 13:33:29 2022 -0500 ci: use yarn instead npm commit864ff91255Author: Jugger <jugger@srjuggernaut.dev> Date: Fri Sep 30 19:32:40 2022 -0500 fix: server use isomorphic-fetch commitc69a166c1fAuthor: Jugger <jugger@srjuggernaut.dev> Date: Fri Sep 30 18:23:38 2022 -0500 revert: deploy as sudo Refs:624b225commit731c9b8962Author: Jugger <jugger@srjuggernaut.dev> Date: Fri Sep 30 17:50:41 2022 -0500 fix: pass only required env to deploy commit624b2251c4Author: Jugger <jugger@srjuggernaut.dev> Date: Fri Sep 30 13:57:27 2022 -0500 feat: post deploy as sudo commitb73cc51e08Author: Jugger <jugger@srjuggernaut.dev> Date: Fri Sep 30 13:41:56 2022 -0500 fix: pass environment to actions commita35e99f8ffAuthor: Jugger <jugger@srjuggernaut.dev> Date: Thu Sep 29 21:54:58 2022 -0500 ci: deploy using pm2 * ci: pm2 configuration file * ci: github action deploy preview * ci: github action deploy production * ci: env variables now pass to pm2 commit4f8c4f6492Author: Jugger <jugger@srjuggernaut.dev> Date: Wed Sep 28 18:09:10 2022 -0500 docs: initial documentation commitc3dae929c6Author: Jugger <jugger@srjuggernaut.dev> Date: Mon Sep 26 12:01:26 2022 -0500 feat: static site * feat: mui support & basic theming * feat: entgamers favicon * feat: public images until dynamic content can be used * feat: entgamers & gaming assets * feat: eslint extra rules * feat: mui theme modifications * feat: fontawesome, gsap, bundle analyzer * feat: common interfaces * feat: basic layout * chore: upadted dependencies * chore: updated dependencies * feat: updated link styles * feat: layout now have better interfaces * feat: basic seo component * feat: static website * feat: env variable rules in .gitignore * feat: added lint to pre-commit commit8573d61066Author: SrJuggernaut <jugger@srjuggernaut.dev> Date: Sat Aug 13 11:29:32 2022 -0500 Initial commit from Create Next App
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
'use client'
|
||||
import Button from '@/components/ui/Button'
|
||||
import Typography from '@/components/ui/Typography'
|
||||
import FormGroup from '@/components/ui/form/FormGroup'
|
||||
import Input from '@/components/ui/form/Input'
|
||||
import { useAppDispatch } from '@/hooks/useAppDispatch'
|
||||
import useSession from '@/hooks/useSession'
|
||||
import { addAlert } from '@/state/feedbackSlice'
|
||||
import { nanoid } from '@reduxjs/toolkit'
|
||||
import { AppwriteException } from 'appwrite'
|
||||
import { updateName } from 'entgamers-database/frontend/session'
|
||||
import { useFormik } from 'formik'
|
||||
import { useEffect, type FC } from 'react'
|
||||
import { object, string } from 'yup'
|
||||
|
||||
interface UpdateUserNameData {
|
||||
name: string
|
||||
}
|
||||
|
||||
const UpdateUserNameSchema = object({
|
||||
name: string().required('El nombre es requerido')
|
||||
})
|
||||
|
||||
const UpdateUserName: FC = () => {
|
||||
const { status, session, user } = useSession('/login')
|
||||
const dispatch = useAppDispatch()
|
||||
|
||||
const formik = useFormik<UpdateUserNameData>({
|
||||
initialValues: {
|
||||
name: ''
|
||||
},
|
||||
onSubmit: async ({ name }) => {
|
||||
try {
|
||||
await updateName(name)
|
||||
dispatch(addAlert({
|
||||
id: nanoid(),
|
||||
title: 'Nombre actualizado',
|
||||
message: 'Se actualizo correctamente el nombre',
|
||||
severity: 'success'
|
||||
}))
|
||||
} catch (error) {
|
||||
if (error instanceof AppwriteException) {
|
||||
dispatch(addAlert({
|
||||
id: nanoid(),
|
||||
message: error.message,
|
||||
title: 'Error mientras se actualizaba el nombre',
|
||||
severity: 'error'
|
||||
}))
|
||||
} else {
|
||||
dispatch(addAlert({
|
||||
id: nanoid(),
|
||||
message: 'Error desconocido',
|
||||
title: 'Error mientras se actualizaba el nombre',
|
||||
severity: 'error'
|
||||
}))
|
||||
}
|
||||
}
|
||||
},
|
||||
validationSchema: UpdateUserNameSchema,
|
||||
validateOnMount: true,
|
||||
initialTouched: { name: true }
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
if (status === 'idle' && session !== undefined && user !== undefined) {
|
||||
formik.setValues({
|
||||
name: user?.name ?? ''
|
||||
})
|
||||
.catch(console.error)
|
||||
}
|
||||
}, [status, session, user, formik])
|
||||
|
||||
if (status !== 'idle' || session === undefined) {
|
||||
// TODO: Replace with Skeleton
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Typography variant="h2">Cambia tu nombre de usuario</Typography>
|
||||
<form
|
||||
onSubmit={formik.handleSubmit}
|
||||
>
|
||||
<FormGroup>
|
||||
<label
|
||||
htmlFor="name"
|
||||
>
|
||||
Nombre de usuario
|
||||
</label>
|
||||
<Input
|
||||
id="name"
|
||||
name="name"
|
||||
type="text"
|
||||
onChange={formik.handleChange}
|
||||
onBlur={formik.handleBlur}
|
||||
value={formik.values.name}
|
||||
status={formik.touched.name !== undefined && formik.errors.name !== undefined ? 'danger' : undefined}
|
||||
/>
|
||||
{formik.touched.name !== undefined && formik.errors.name !== undefined && (
|
||||
<Typography variant="caption" color="danger">{formik.errors.name}</Typography>
|
||||
)}
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={formik.isSubmitting || !formik.isValid}
|
||||
>
|
||||
Actualizar nombre de usuario
|
||||
</Button>
|
||||
</FormGroup>
|
||||
</form>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default UpdateUserName
|
||||
Reference in New Issue
Block a user