Skip to content

Commit

Permalink
Merge pull request #94 from riccardofano/rename-utils-to-core
Browse files Browse the repository at this point in the history
Rename utils folder to core
  • Loading branch information
riccardofano authored Jan 28, 2024
2 parents 278a43d + 027fbd8 commit 0f33bb0
Show file tree
Hide file tree
Showing 17 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions components/Categories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChangeEvent } from 'react'
import { AnimatePresence } from 'framer-motion'

import { CategoryName } from '../utils/types/Category'
import { PersonList } from '../utils/types/Person'
import { CategoryName } from '../core/types/Category'
import { PersonList } from '../core/types/Person'

import { Mode, useModeContext } from '../context/ModeContext'
import { usePeopleDispatchContext } from '../context/PeopleContext'
Expand Down
2 changes: 1 addition & 1 deletion components/RelativeCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from 'next/link'
import { ChangeEvent } from 'react'
import { usePeopleDispatchContext } from '../context/PeopleContext'
import { Person } from '../utils/types/Person'
import { Person } from '../core/types/Person'

interface RelativeCardProps {
id: string
Expand Down
4 changes: 2 additions & 2 deletions components/RelativeCardList.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AnimatePresence, motion } from 'framer-motion'

import { CategoryName } from '../utils/types/Category'
import { CategoryName } from '../core/types/Category'
import { usePeopleDispatchContext } from '../context/PeopleContext'
import { Mode } from '../context/ModeContext'

import RelativeCard from './RelativeCard'
import { PersonList } from '../utils/types/Person'
import { PersonList } from '../core/types/Person'

interface RelativeCardListProps {
id: string
Expand Down
2 changes: 1 addition & 1 deletion components/RelativesForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeEvent, FormEvent } from 'react'
import { Person, PersonList } from '../utils/types/Person'
import { Person, PersonList } from '../core/types/Person'

import { usePeopleDispatchContext } from '../context/PeopleContext'

Expand Down
4 changes: 2 additions & 2 deletions components/Results.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Dispatch, SetStateAction, useState } from 'react'
import Fraction from 'fraction.js'
import { Person, PersonList } from '../utils/types/Person'
import { CategoryName } from '../utils/types/Category'
import { Person, PersonList } from '../core/types/Person'
import { CategoryName } from '../core/types/Category'

import { useModeContext } from '../context/ModeContext'
import { useMoneyContext } from '../context/MoneyContext'
Expand Down
4 changes: 2 additions & 2 deletions context/PeopleContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createContext, Dispatch, ReactNode, useContext, useReducer } from 'react'
import { CategoryName } from '../utils/types/Category'
import { Person, PersonList } from '../utils/types/Person'
import { CategoryName } from '../core/types/Category'
import { Person, PersonList } from '../core/types/Person'

export const PeopleContext = createContext<PersonList | null>(null)
export const PeopleDispatchContext = createContext<Dispatch<PeopleAction> | null>(null)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion hooks/useMe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useRouter } from 'next/router'
import { useEffect } from 'react'
import { usePeopleContext } from '../context/PeopleContext'
import { Person, PersonList } from '../utils/types/Person'
import { Person, PersonList } from '../core/types/Person'

export function useMe(id: string): { me: Person | undefined; list: PersonList } {
const router = useRouter()
Expand Down
2 changes: 1 addition & 1 deletion pages/api/inheritance.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { calculateInheritance } from '../../utils/inheritance'
import { calculateInheritance } from '../../core/inheritance'

export default function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method !== 'POST') return res.status(405).send({ error: 'Method not allowed' })
Expand Down
2 changes: 1 addition & 1 deletion pages/api/patrimony.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { calculatePatrimony } from '../../utils/patrimony'
import { calculatePatrimony } from '../../core/patrimony'

export default function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method !== 'POST') return res.status(405).send({ error: 'Method not allowed' })
Expand Down

1 comment on commit 0f33bb0

@vercel
Copy link

@vercel vercel bot commented on 0f33bb0 Jan 28, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.