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 * as React from 'react'; | |
| import { Card } from '@/components/ui/card'; | |
| import { Button } from '@/components/ui/button'; | |
| import { useExpandable } from '@/hooks/use-expandable'; | |
| interface CardExpandableProps { | |
| minHeight: number; | |
| children: React.ReactNode; | |
| } |
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 * as React from 'react'; | |
| import { useIntersectionObserver} from './use-intersection-observer'; | |
| export function FadeInOnScroll() { | |
| const elementRef = React.useRef<HTMLDivElement | null>(null); | |
| const entry = useIntersectionObserver(elementRef, { threshold: 0.5 }); | |
| return ( | |
| <div | |
| ref={elementRef} |
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 postalCodes from './postal_codes.json' | |
| export function getProvinceByPostalCode(postalCode: number): string | null { | |
| for (const province of postalCodes) { | |
| if (province.code.includes(postalCode)) { | |
| return province.nameProvince | |
| } | |
| } | |
| return null | |
| } |
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
| 'use strict'; | |
| import { v4 as uuidv4 } from 'uuid'; | |
| const NAME_DB = 'accounts'; | |
| export class RestApiLocalStorage { | |
| currentItems = []; | |
| constructor() { | |
| this.getData(); |