Skip to content

Commit

Permalink
fix(typo): typo
Browse files Browse the repository at this point in the history
  • Loading branch information
cjtim committed Oct 31, 2022
1 parent 00d97a1 commit 0c4b881
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 20 deletions.
4 changes: 2 additions & 2 deletions components/PetsMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ const Map: React.FC<Props> = ({ markers }) => {

return (
<Flex w="100vw" h="90vh">
<Box w="20%" overflowY="scroll">
<Box w="25%" overflowY="scroll">
{onClicks && markers?.map((marker, idx) => <marker.SideContent key={marker.name} onClick={onClicks[idx]} />)}
</Box>
<Box id={id} w="79%" />
<Box id={id} w="74%" />
</Flex>
)
}
Expand Down
2 changes: 1 addition & 1 deletion components/global/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const Navbar: React.FC<Props> = ({ user }) => {
<MenuItem textDecoration="none">ถูกใจ</MenuItem>
</NextLink>
<NextLink href={internalPages.user.interested} passHref>
<MenuItem textDecoration="none">สัตว์ที่อุปการะ</MenuItem>
<MenuItem textDecoration="none">สัตว์ที่อุปถัมภ์</MenuItem>
</NextLink>
</>
)}
Expand Down
6 changes: 4 additions & 2 deletions components/login/UserInfoRequiredPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ const UserInfoRequiredPopup: React.FC<Props> = ({ user }) => {
router.reload()
}

return user.phone ? (
const { is_org: isOrg, phone, lat } = user

return (isOrg ? lat && phone : phone) ? (
// eslint-disable-next-line react/jsx-no-useless-fragment
<></>
) : (
<Modal isOpen onClose={onClose} size="6xl">
<ModalOverlay />
<ModalContent>
<ModalHeader>แก้ไขบัญชี</ModalHeader>
<ModalHeader>โปรดใส่เบอร์โทรที่สามารถติดต่อได้</ModalHeader>
<ModalCloseButton />
<ModalBody>
<UserUpdateCard user={user} onSubmitRegister={handleSave} />
Expand Down
12 changes: 10 additions & 2 deletions components/pets/InterestedStepTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ const colorMap = (status: Interested['step']): TagProps => {
return {
colorScheme: 'blue',
}
case InterestedStep.REVIEWING:
case InterestedStep.SCREENING:
return {
colorScheme: 'yellow',
}
case InterestedStep.ADOPED:
case InterestedStep.CONFIRMATION:
return {
colorScheme: 'green',
}
case InterestedStep.FAILED:
return {
colorScheme: 'red',
}
case InterestedStep.PICKEDUP:
return {
colorScheme: 'green',
}
Expand Down
4 changes: 2 additions & 2 deletions interfaces/interested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { User } from './User'
export enum InterestedStep {
PENDING = 'ได้รับข้อมูลแล้ว',
SCREENING = 'กำลังตรวจสอบข้อมูล และติดต่อกลับ',
CONFIRMATION = 'ยืนยันรับอุปการะ',
CONFIRMATION = 'ยืนยันรับอุปถัมภ์',

FAILED = 'คุณสมบัติไม่ผ่าน',
PICKEDUP = 'เสร็จสิ้นการอุปการะ',
PICKEDUP = 'เสร็จสิ้นการอุปถัมภ์',
}

export interface Interested {
Expand Down
4 changes: 2 additions & 2 deletions pages/pets/[pet_id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ const PetDetails: NextPage<UserProps & Props> = ({ user, pet, shelter, createdAt
<Button colorScheme="blue" onClick={onClickLike} leftIcon={<StarIcon />}>
{isLiked ? 'ยกเลิกถูกใจ' : 'ถูกใจ'}
</Button>
<Tooltip label="เมื่อรับอุปการะแล้วจะไม่สามารถยกเลิกได้" hasArrow>
<Tooltip label="เมื่อรับอุปถัมภ์แล้วจะไม่สามารถยกเลิกได้" hasArrow>
<Button colorScheme="yellow" onClick={onClickInterested} isDisabled={Boolean(isInterested)}>
{isInterested ? 'อยู่ในกระบวนการพิจารณาการอุปการะ' : 'สนใจรับอุปการะ'}
{isInterested ? 'อยู่ในกระบวนการพิจารณาการอุปถัมภ์' : 'สนใจรับอุปถัมภ์'}
</Button>
</Tooltip>
</Flex>
Expand Down
9 changes: 1 addition & 8 deletions pages/shelters/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,13 @@ const ShelterDetails: NextPage<UserProps & Props> = ({ user, shelter, pets, crea
<UserImg user={shelter} />
<Heading>{shelter?.name}</Heading>
</Flex>
DETAILS
<Flex>
<SimpleGrid columns={2} spacing={1}>
<SimpleGrid columns={2} spacing={1} h="1">
<Text>อีเมล</Text>
<TextLink title={shelter.email} to={`mailto:${shelter.email}`} text={`${shelter.email}` || '-'} />

<Text>โทรศัพท์ </Text>
<Text color="gray"> {shelter.phone || '-'}</Text>
<Text>Facebook </Text>
<Text color="gray"> {shelter.phone || '-'}</Text>
<Text>Line</Text>
<Text color="gray"> {shelter.phone || '-'}</Text>
<Text>Website </Text>
<Text color="gray"> {shelter.phone || '-'}</Text>

<Text>เป็นสมาชิกเมื่อ </Text>
<Text color="gray">{createdAt}</Text>
Expand Down
2 changes: 1 addition & 1 deletion pages/user/interested.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const UserInterestedPage: NextPage<UserProps & Props> = ({ user, pets }) => (
<Navbar user={user} />

<Center flexDir="column" gap={2} p={4}>
<Heading>สัตว์ที่รับอุปการะ</Heading>
<Heading>สัตว์ที่รับอุปถัมภ์</Heading>
<InterestedTable pets={pets} />
</Center>
</PageLayout>
Expand Down

1 comment on commit 0c4b881

@vercel
Copy link

@vercel vercel bot commented on 0c4b881 Oct 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

be-friends – ./

be-friends-git-master-cjtim.vercel.app
be-friends-cjtim.vercel.app
be-friends.vercel.app

Please sign in to comment.