solo, paired, solo mini, group, solo tic tac toe rock paper scissors 1-2 weeks in duration feedback is expected to be implemented in your next project post your problems in the cohort channel first, then to ALL instructors
This gist contains a short assignment I'd like everyone to complete before our formal lesson. The prework involves reading some of the React Router documentation, and will allow us to keep the lesson more hands on.
- Fork this gist
- On your own copy, go through the listed readings and answer associated questions
You will not be turning this in; it's for your own understanding/learning/benefit 😁
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 { useCallback, useId, useMemo } from 'react'; | |
| import Checkbox from '@components/Checkbox'; | |
| export type CheckboxOption = { value: string; label: string }; | |
| type CheckboxesProps = { | |
| name: string; | |
| options: CheckboxOption[]; | |
| values: string[]; |
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 RadixCheckbox from '@radix-ui/react-checkbox'; | |
| import { useId } from 'react'; | |
| import CheckmarkIcon from '@components/icons/Checkmark'; | |
| import styles from './Checkbox.module.scss'; | |
| type CheckboxProps = { | |
| label?: string; | |
| id?: string; |
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 { useMutation, useQueryClient } from '@tanstack/react-query'; | |
| import { AddClientNoteRequestModel } from '@generated/api/models/AddClientNoteRequestModel'; | |
| import { ClientNoteResponseModelPaginatedList } from '@generated/api/models/ClientNoteResponseModelPaginatedList'; | |
| import { api } from '@utils/axios'; | |
| export const useCreateNote = (clientId: string) => { | |
| const queryClient = useQueryClient(); | |
| return useMutation( |
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 { useMemo, useState } from 'react'; | |
| import { UserFormState } from '@components/settings/account-management/UserCard'; | |
| import { ApiError } from '@generated/api/core/ApiError'; | |
| import { AddClientNoteRequestModel } from '@generated/api/models/AddClientNoteRequestModel'; | |
| import { useCreateNote } from './mutation/useCreateNote'; | |
| export type TypeAddNote = { |
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 { NextApiRequest, NextApiResponse } from 'next'; | |
| import { AddClientNoteRequestModel } from '@generated/api/models/AddClientNoteRequestModel'; | |
| import { ClientNoteSortOption } from '@generated/api/models/ClientNoteSortOption'; | |
| import { SortDirection } from '@generated/api/models/SortDirection'; | |
| import { appClient } from '@lib/api/appClient'; | |
| import { withMethodRestriction } from '@lib/api/utils/withMethodRestriction'; | |
| import { HTTP_METHODS } from '@lib/constants'; |