Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/paaatrrrick/personalwebsite/llms.txt

Use this file to discover all available pages before exploring further.

The /magic-the-gathering route is registered in src/App.js and rendered by the Haus component in src/components/Haus.js.

What the page actually does

Despite the route name, this page does not display Magic: The Gathering content. On mount, it fires a fetch request to the Wordsmith API and immediately redirects the browser to a Google Form:
src/components/Haus.js
import { useEffect } from "react";

const Haus = () => {
    useEffect(() => {
        fetchHaus();
    }, []);

    const fetchHaus = async () => {
        const response = await fetch(
            "https://wordsmith-api-production.up.railway.app/magic-the-gathering"
        );
        window.location.href =
            "https://docs.google.com/forms/d/e/1FAIpQLSd-bKO-rbVyyBtGjMCPPpilwpJevLJRi_J-bnYE2CnUtOFv9w/viewform";
    };

    return <h1></h1>;
};

export default Haus;
The component renders an empty <h1> as a placeholder while the redirect completes. Visitors who navigate to /magic-the-gathering will be sent to the Google Form almost immediately.

Route

RouteComponentSource file
/magic-the-gatheringHaussrc/components/Haus.js
The route is registered in src/App.js using React Router v4:
src/App.js
import Haus from "./components/Haus";

<Route exact path='/magic-the-gathering' component={Haus} />

Behavior summary

  1. Visitor navigates to /magic-the-gathering.
  2. React Router mounts the Haus component.
  3. The useEffect hook fires fetchHaus() on mount.
  4. fetchHaus calls fetch("https://wordsmith-api-production.up.railway.app/magic-the-gathering").
  5. window.location.href is set to the Google Form URL, immediately redirecting the browser.

Modifying this page

To change where visitors are redirected, update the window.location.href value in src/components/Haus.js. To add actual content instead of a redirect, replace the fetchHaus logic and the return statement with your desired JSX.

Build docs developers (and LLMs) love