Skip to content

Commit

Permalink
fix: redirect to home page after posting a highligh
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgchan committed Jul 17, 2023
1 parent f67f673 commit f0a5060
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/popup/pages/posthighlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import OpenSaucedLogo from "../../assets/opensauced-logo.svg";
import { useAuth } from "../../hooks/useAuth";
import toast, { Toaster } from "react-hot-toast";
import { createHighlight } from "../../utils/fetchOpenSaucedApiData";
import { goBack } from "react-chrome-extension-router";
import { goBack, goTo } from "react-chrome-extension-router";
import { OPEN_SAUCED_INSIGHTS_DOMAIN } from "../../constants";
import { getAiDescription } from "../../content-scripts/components/GenerateAIDescription/DescriptionGeneratorButton";
import Home from "./home";

const PostOnHighlight = ({ prUrl, prTitle }: { prUrl: string, prTitle: string }) => {
const { authToken, user } = useAuth();
Expand Down Expand Up @@ -47,6 +48,7 @@ const PostOnHighlight = ({ prUrl, prTitle }: { prUrl: string, prTitle: string })
if (!data.ok) {
throw new Error(`Statues code ${data.status}`);
}
goTo(Home);
return (
<span>
<a
Expand Down

0 comments on commit f0a5060

Please sign in to comment.