Skip to content

Commit

Permalink
update app for base url
Browse files Browse the repository at this point in the history
  • Loading branch information
ryley-o committed Oct 29, 2024
1 parent 8442f51 commit e0e972d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const coreDeploymentOptions = coreDeployments[network.id];
function App() {
const [contractAddress, tokenId] = window.location.pathname
.split("/")
.slice(1);
.slice(2);
const [error, setError] = useState<string | null>(null);
const [loading, setLoading] = useState(true);
const [isForm, setIsForm] = useState(false);
Expand Down
3 changes: 2 additions & 1 deletion src/components/inputForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export const InputForm = ({
onSubmit={(values, { setSubmitting }) => {
window.open(
window.location.origin +
`/${values.contractAddress}/${values.tokenId}`,
import.meta.env.BASE_URL +
`${values.contractAddress}/${values.tokenId}`,
"_blank"
);
setSubmitting(false);
Expand Down

0 comments on commit e0e972d

Please sign in to comment.