Skip to content

Commit

Permalink
Merge pull request #778 from Prop-House/snca-og-cards-w
Browse files Browse the repository at this point in the history
Disable mixpanel on og routes
  • Loading branch information
cryptoseneca committed Jan 31, 2024
2 parents 274ba8b + dfe82b7 commit 05be64d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions packages/prop-house-webapp/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ function App() {
const location = useLocation();
const [noActiveCommunity, setNoActiveCommunity] = useState(false);

mixpanel.init(process.env.REACT_APP_MIXPANEL_TOKEN!, {
debug: process.env.REACT_APP_NODE_ENV === 'production' ? false : true,
track_pageview: true,
persistence: 'localStorage',
});

useEffect(() => {
setNoActiveCommunity(false);

Expand All @@ -77,6 +71,14 @@ function App() {
const house = useAppSelector(state => state.propHouse.activeHouse);
const showCreatePropPage = round && house;

if (!openGraphCardPath) {
mixpanel.init(process.env.REACT_APP_MIXPANEL_TOKEN!, {
debug: process.env.REACT_APP_NODE_ENV === 'production' ? false : true,
track_pageview: true,
persistence: 'localStorage',
});
}

return (
<>
<WagmiConfig config={config}>
Expand Down
2 changes: 1 addition & 1 deletion packages/prop-house-webapp/src/utils/cardServiceUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export const cardServiceUrl = (cardtype: CardType, address: string, id?: string)
? process.env.REACT_APP_DEV_CARD_SERVICE_URI
: 'http://localhost:3002';

return new URL(`/remote/${cardtype}/${address}${id ? `/${id}` : ''}/card`, base);
return new URL(`/remote/${cardtype}/${address}${id ? `/${id}` : ''}`, base);
};

0 comments on commit 05be64d

Please sign in to comment.