diff --git a/apps/frontend/components/RaidUpdateForm.tsx b/apps/frontend/components/RaidUpdateForm.tsx index 8fad1c46..7e159049 100644 --- a/apps/frontend/components/RaidUpdateForm.tsx +++ b/apps/frontend/components/RaidUpdateForm.tsx @@ -31,10 +31,10 @@ const RaidUpdateForm: React.FC = ({ }: RaidUpdateFormProps) => { const [sending, setSending] = useState(false); const [startDate, setStartDate] = useState( - new Date(raid?.startDate) ?? new Date() + raid?.startDate ? new Date(raid?.startDate) : new Date() ); const [endDate, setEndDate] = useState( - new Date(raid?.endDate) ?? add(new Date(), { weeks: 1 }) + raid?.endDate ? new Date(raid?.endDate) : add(new Date(), { weeks: 1 }) ); const { data: session } = useSession(); const token = _.get(session, 'token'); diff --git a/apps/frontend/hooks/useRaidDetail.ts b/apps/frontend/hooks/useRaidDetail.ts index 00a51459..fb0ebd70 100644 --- a/apps/frontend/hooks/useRaidDetail.ts +++ b/apps/frontend/hooks/useRaidDetail.ts @@ -14,7 +14,7 @@ const useRaidDetail = ({ raidId, token }) => { return camelize(_.get(result, 'raids_by_pk')); }; - console.log('enabled?', Boolean(token) && Boolean(raidId)); + const { isLoading, isFetching, isError, error, data } = useQuery< IRaid, Error