Skip to content

Commit

Permalink
fix: move refetchOnMount to GeneralSection
Browse files Browse the repository at this point in the history
  • Loading branch information
althafdaa committed Aug 18, 2024
1 parent 8166e5a commit bb713be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/components/circle/detail-page/GeneralInfoSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ const ReferralButton = () => {
};

function GeneralInfoSection() {
const { data } = useGetCircleBySlug();
const { data } = useGetCircleBySlug({
options: {
refetchOnMount: true,
},
});
const { isAllowed } = useIsMyCircle();
const isAnyUrlExist =
data?.url || data?.twitter_url || data?.instagram_url || data?.facebook_url;
Expand Down
6 changes: 1 addition & 5 deletions src/pages/[circleSlug]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ export const getServerSideProps = async (c: GetServerSidePropsContext) => {
};

function CirclePage() {
const { error, isPending, data } = useGetCircleBySlug({
options: {
refetchOnMount: true,
},
});
const { error, isPending, data } = useGetCircleBySlug();

const Content = () => {
if (error) {
Expand Down

0 comments on commit bb713be

Please sign in to comment.