Skip to content

Commit

Permalink
fix: Include pathname in preview URLs (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish authored May 1, 2020
1 parent eab6e63 commit c03f5e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/usePreviewUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useContext } from 'react';
import { StoreContext } from './../StoreContext/StoreContext';
import { createPreviewUrl } from '../../utils';

const baseUrl = `${window.location.protocol}//${window.location.host}`;
const baseUrl = window.location.href.split('#')[0];

export default (theme: string) => {
const [{ code }] = useContext(StoreContext);
Expand Down

0 comments on commit c03f5e5

Please sign in to comment.