Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
simon0820s committed Dec 15, 2024
2 parents 2060bf4 + 58a6317 commit 90ca09a
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 154 deletions.
16 changes: 1 addition & 15 deletions src/app/(auth)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,7 @@ export default function Page() {
Or
</Typography>
<Stack gap={2}>
<ButtonSignInGoogle />
<Button
startIcon={<Image src={IconFacebook} alt="icon-facebook" width={24} height={24} />}
variant="outlinedGray"
disabled
>
Continue with Facebook
</Button>
<Button
startIcon={<Image src={IconApple} alt="icon-apple" width={24} height={24} />}
variant="outlinedGray"
disabled
>
Continue with Apple
</Button>
<ButtonSignInGoogle up={false} />
</Stack>
</Stack>
</CardContent>
Expand Down
19 changes: 2 additions & 17 deletions src/app/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import HeaderCard from '@/components/common/cards/HeaderCard'
import { Card, CardContent, Typography, Stack, Container, TextField, Button, Box } from '@mui/material'
import { type Metadata } from 'next'
import Image from 'next/image'
import IconGoogle from '@/public/images/icons/google.svg?url'
import IconFacebook from '@/public/images/icons/facebook.svg?url'
import IconApple from '@/public/images/icons/apple.svg?url'
import Link from 'next/link'
import ButtonSignInGoogle from '@/components/auth/signin/ButtonSignInGoogle'

export const metadata: Metadata = {
title: 'Sign Up',
Expand Down Expand Up @@ -33,19 +30,7 @@ export default function Page() {
</Typography>
<Stack direction="row" gap={2}>
<Box flex={1}>
<Button fullWidth variant="outlinedGray">
<Image src={IconGoogle} alt="icon-google" width={24} height={24} />
</Button>
</Box>
<Box flex={1}>
<Button fullWidth variant="outlinedGray">
<Image src={IconFacebook} alt="icon-facebook" width={24} height={24} />
</Button>
</Box>
<Box flex={1}>
<Button fullWidth variant="outlinedGray">
<Image src={IconApple} alt="icon-apple" width={24} height={24} />
</Button>
<ButtonSignInGoogle up={true} />
</Box>
</Stack>
</Stack>
Expand Down
52 changes: 1 addition & 51 deletions src/components/activities/Update/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,57 +194,7 @@ export default function ActivityUpdate({ review, submitHandler, deleteHandler, d
htmlInput: { ...register('description') },
}}
error={!!errors?.description}
/>
<Box>
<Box>
<InputLabel>What are the requirements for the attendee?</InputLabel>
<Stack gap="8px">
{requirements.split(',').map((requirement, index) => (
<Stack key={index} direction="row" gap={2}>
<TextField
select
onChange={(event) => handleRequirementsChange(event, index)}
slotProps={{
htmlInput: { ...register('requirements') },
}}
error={!!errors.requirements}
defaultValue={requirement}
sx={{ width: '100%' }}
>
<MenuItem disabled value="0">
Select requirement
</MenuItem>
{requirementsOptions.map((requirementOption) => (
<MenuItem
key={requirementOption.value}
disabled={requirementOption.disabled}
value={requirementOption.value}
>
{requirementOption.label}
</MenuItem>
))}
</TextField>
</Stack>
))}
</Stack>
</Box>
<Button
onClick={handleAddRequirement}
variant="contained"
color="secondary"
size="small"
sx={{ marginTop: '16px', padding: '6px 12px' }}
>
<Stack direction="row" alignItems="center" justifyContent="center" gap={1}>
<Icon color="primary" sx={{ fontSize: '16px', lineHeight: '16px' }}>
add_circle
</Icon>
<Typography fontWeight={700} fontSize={14}>
Add other requirement
</Typography>
</Stack>
</Button>
</Box>
/>
<TextField
id="activityName"
variant="outlined"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,61 +97,6 @@ export default function CreateActivityRequirementsRewards({ review, submitHandle
<CardContent>
<Box width="64%">
<Stack gap="48px">
<Box>
<Box>
<InputLabel>What are the requirements for the attendee?</InputLabel>
<Stack gap="8px">
{requirements.split(',').map((requirement, index) => (
<Stack key={index} direction="row" gap={2}>
<TextField
select
onChange={(event) => handleRequirementsChange(event, index)}
value={requirement}
sx={{ width: '100%' }}
slotProps={{
htmlInput: { ...register('requirements') },
}}
error={!!errors?.requirements}
>
<MenuItem disabled value="0">
Select requirement
</MenuItem>
{requirementsOptions.map((requirementOption) => (
<MenuItem
key={requirementOption.value}
disabled={requirementOption.disabled}
value={requirementOption.value}
>
{requirementOption.label}
</MenuItem>
))}
</TextField>
{/* {requirements.length > 1 && (
<Button onClick={(event) => handleRemoverequirements(event, index)} sx={{ padding: '8px' }}>
<Icon>close</Icon>
</Button>
)} */}
</Stack>
))}
</Stack>
</Box>
<Button
onClick={handleAddRequirement}
variant="contained"
color="secondary"
size="small"
sx={{ marginTop: '16px', padding: '6px 12px' }}
>
<Stack direction="row" alignItems="center" justifyContent="center" gap={1}>
<Icon color="primary" sx={{ fontSize: '16px', lineHeight: '16px' }}>
add_circle
</Icon>
<Typography fontWeight={700} fontSize={14}>
Add other requirement
</Typography>
</Stack>
</Button>
</Box>
<TextField
id="activityName"
variant="outlined"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ export default function ActivityReview({ review, children }: Props) {
value={review.description}
multiline
/>
<TextField
id="activityName"
variant="outlined"
label="What are the requirements for the attendee?"
value={review.requirements}
placeholder="Select requirement"
/>
<TextField
id="activityName"
variant="outlined"
Expand Down
4 changes: 2 additions & 2 deletions src/components/auth/signin/ButtonSignInGoogle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Image from 'next/image'
import LoadingButton from '@/components/common/buttons/LoadingButton'
import { Stack, Typography } from '@mui/material'

const ButtonSignInGoogle = (): ReactElement => {
const ButtonSignInGoogle = ({ up }: { up: boolean }): ReactElement => {
const [loading, setLoading] = useState<boolean>(false)
const [error, setError] = useState<string | null>(null)

Expand Down Expand Up @@ -35,7 +35,7 @@ const ButtonSignInGoogle = (): ReactElement => {
fullWidth
disabledMargin
>
Continue with Google
{up ? '' : 'Continue with Google'}
</LoadingButton>
{error && (
<Typography variant="body2" color="error" textAlign="center">
Expand Down
3 changes: 1 addition & 2 deletions src/components/auth/signup/ChooseCommunity/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { useQuery } from '@tanstack/react-query'
import communitiesService from '@/features/communities/services/communities.service'

const ChooseCommunity = (): ReactElement => {

const { data, isLoading, error, refetch } = useQuery<Communities | undefined>({
queryKey: ['getCommunities'],
queryFn: async () => await communitiesService.get(),
Expand All @@ -22,7 +21,7 @@ const ChooseCommunity = (): ReactElement => {
const [step, setStep] = useState<number>(1)

const handleChange = (community: Community) => {
setSelectedCommunity(community)
if (community.id == 'Trinidad') setSelectedCommunity(community)
}

const handleNextStep = () => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/Layout/AppBar/AccountMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ const AccountMenu = (): ReactElement => {
>
<Box
sx={{
position: 'relative', // Necesario para posicionar la imagen superpuesta
display: 'inline-block', // Asegura que ocupe solo el espacio del contenido
width: 48,
position: 'relative',
display: 'inline-block',
width: 5,
height: 48,
}}
></Box>
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Layout/AppBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function CustomAppBar({
</Typography>
</Toolbar>
<Toolbar disableGutters variant="dense" sx={{ gap: 2 }}>
<Link href="/">
<Link href="/communities">
<Button variant="contained" color="secondary" sx={{ borderRadius: 100, minWidth: 0, padding: 2 }}>
<Icon color="primary" sx={{ lineHeight: '22px' }}>
home
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function signOut() {
await supabase.auth.signOut()

revalidatePath('/', 'layout')
redirect('/')
redirect('/communities')
}

export async function signup(formData: FormData) {
Expand Down

0 comments on commit 90ca09a

Please sign in to comment.