Skip to content

Commit

Permalink
fix: remove redundant relationships when creating a rat.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter253545 committed Jul 2, 2023
1 parent 3ae3dbd commit 4d5a2ce
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/components/Forms/AddRatForm/AddRatForm.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { useCallback, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useDispatch } from 'react-redux'

import CMDRFieldset from '~/components/Fieldsets/CMDRFieldset'
import ExpansionFieldset from '~/components/Fieldsets/ExpansionFieldset'
import SelectFieldset from '~/components/Fieldsets/SelectFieldset'
import useForm from '~/hooks/useForm'
import { createRat } from '~/store/actions/rats'
import { selectCurrentUserId } from '~/store/selectors'

import styles from './AddRatForm.module.scss'

Expand All @@ -23,7 +22,6 @@ const initialState = {

function AddRatForm () {
const dispatch = useDispatch()
const userId = useSelector(selectCurrentUserId)
const [formOpen, setFormOpen] = useState(false)
const handleToggleForm = useCallback(() => {
setFormOpen((state) => {
Expand All @@ -39,14 +37,6 @@ function AddRatForm () {
platform,
expansion: platform === 'pc' ? expansion : 'horizons3',
},
relationships: {
user: {
data: {
type: 'users',
id: userId,
},
},
},
}))
setFormOpen(false)
}
Expand Down

0 comments on commit 4d5a2ce

Please sign in to comment.