This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //BAD PRACTISE | |
| const { someValue, setSomeValue, isUpdateValue, } = useContext() | |
| const myCoolFunction = () => { | |
| const data = getData() | |
| //Do other stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { v4 as uuid } from 'uuid' | |
| const heightData = [...] | |
| //Discouraged | |
| const heightDataComponent = heightData.map((heightData, index) => { | |
| return <SomeElement key={index} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const getHeightData = () =>{ | |
| let heightData= | |
| for (i = 0... | |
| return | |
| } | |
| //The other way |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IsOnline for proiles. | |
| - From `Header.tsx` -> `Profile.tsx` set is online functionality. | |
| - `isOnline` on NewUserCard.tsx | |
| - Rename NewUserCard.tsx to | |
| - NewUserCard.tsx -> ExploreUserCard.tsx | |
| - DetailedUserCard.tsx -> InsepectUserCard.tsx | |
| - Sandra PR merge | |
| - Checkout Instagram service error, and possibility to connect | |
| - Notification service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //New change | |
| style={[ | |
| styles.chip, | |
| { | |
| backgroundColor: selected ? colors.violet4 : colors.mainbackground, | |
| padding: 2, | |
| borderWidth: 1, | |
| borderColor: selected ? colors.violet4 : noBorder, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export interface SignUpNewPayload { | |
| email: string | |
| password: string | |
| hasAcceptedTerms: boolean | |
| hasAcceptedMarketing: boolean | |
| } | |
| //HTTP payload | |
| const data: SignUpNewPayload = { | |
| email: email.value, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const MAX_AMOUNT_USER_IMAGE = 6 | |
| export const ImagePlaceholder = () => { | |
| return <View>...</View> | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async handleDisconnect(client: Socket) { | |
| this.logger.debug(`${client.id} is disconnected...`) | |
| //Handle end acitivty session | |
| await this.authService.removeSocket(client.id) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async handleConnection(client: Socket) { | |
| this.logger.debug(`${client.id} is connected...`) | |
| // eslint-disable-next-line @typescript-eslint/tslint/config | |
| const token = client.handshake.query?.token | |
| // eslint-disable-next-line @typescript-eslint/tslint/config | |
| const deviceType: string = client.handshake.query?.deviceType || 'WEB' | |
| const ipAddress: string = client.handshake.address || null | |
| if (!token) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { IsIP } from 'class-validator' | |
| import { BaseEntity } from 'src/utilities/models/base.entity' | |
| import { Column, Entity, ManyToOne } from 'typeorm' | |
| import { User } from '../user.entity' | |
| export enum DeviceType { | |
| IOS = 'IOS', | |
| ANDROID = 'ANDROID', | |
| //Can add web and more later on | |
| } |