Skip to content

Commit

Permalink
tweak date(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrepreneur committed Feb 14, 2023
1 parent bd6ce22 commit 72c02bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/frontend/components/RaidUpdateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const RaidUpdateForm: React.FC<RaidUpdateFormProps> = ({
}: RaidUpdateFormProps) => {
const [sending, setSending] = useState(false);
const [startDate, setStartDate] = useState<Date | null>(
new Date(raid?.startDate) ?? new Date()
raid?.startDate ? new Date(raid?.startDate) : new Date()
);
const [endDate, setEndDate] = useState<Date | null>(
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');
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/hooks/useRaidDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72c02bf

Please sign in to comment.