Skip to content

Commit

Permalink
skip request if profile isn't set
Browse files Browse the repository at this point in the history
  • Loading branch information
takaishi committed Dec 11, 2023
1 parent 107c619 commit b13ef7d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/QaList/QaList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ type Props = {
export const QaList: React.FC<Props> = ({ event, talks }) => {
const settings = useSelector(settingsSelector)
const [talk, setTalk] = useState<Talk | undefined>(undefined)
const { data, isLoading, isError, error } = useGetApiV1ChatMessagesQuery({
eventAbbr: event.abbr,
roomType: 'talk',
profileId: `${settings.profile.id}`,
})
const { data, isLoading, isError, error } = useGetApiV1ChatMessagesQuery(
{
eventAbbr: event.abbr,
roomType: 'talk',
profileId: `${settings.profile.id}`,
},
{ skip: settings.profile.id === 0 },
)
const findTalkById = (
talks: Talk[],
id: number | undefined,
Expand Down

0 comments on commit b13ef7d

Please sign in to comment.