Skip to content

Commit

Permalink
Clean up routing
Browse files Browse the repository at this point in the history
  • Loading branch information
liambai committed Nov 2, 2024
1 parent 262fd3c commit cb9b78e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion viz/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const router = createHashRouter([
element: <LandingPage />,
},
{
path: "/:model/:feature?",
path: "/sae-viz/:model?/:feature?",
element: <SAEVisualizer />,
},
]);
Expand Down
3 changes: 1 addition & 2 deletions viz/src/SAEVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function SAEVisualizer() {
});

useEffect(() => {
navigate(`/${selectedModel}/${selectedFeature}`);
navigate(`/sae-viz/${selectedModel}/${selectedFeature}`);
}, [selectedModel, selectedFeature, navigate]);

const [featureData, setFeatureData] = useState<SingleSeq[]>([]);
Expand Down Expand Up @@ -195,7 +195,6 @@ function SAEVisualizer() {
))}
</div>
</div>

<MolstarMulti proteins={featureData} />
</main>
</SidebarProvider>
Expand Down
6 changes: 3 additions & 3 deletions viz/src/components/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const LandingPage: React.FC = () => {
<X />
</button>
<Link
to="/sae-visualizer"
to="/sae-viz"
className="text-2xl text-gray-600 hover:text-gray-900"
onClick={() => setIsMobileMenuOpen(false)}
>
Expand Down Expand Up @@ -61,7 +61,7 @@ const LandingPage: React.FC = () => {
</div>
) : (
<nav className="space-x-4 flex">
<Link to="/sae-visualizer" className="text-gray-600 hover:text-gray-900">
<Link to="/sae-viz" className="text-gray-600 hover:text-gray-900">
Visualizer
</Link>
<Link
Expand Down Expand Up @@ -109,7 +109,7 @@ const LandingPage: React.FC = () => {
soon!
</p>
<Link
to="/sae-visualizer"
to="/sae-viz"
className="bg-black text-white px-6 py-3 rounded-full text-lg inline-block order-2 sm:order-none mb-8 w-full sm:w-auto text-center"
>
SAE Visualizer
Expand Down

0 comments on commit cb9b78e

Please sign in to comment.