Skip to content

Commit daf7dd0

Browse files
committed
add Polar route
1 parent ab50807 commit daf7dd0

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

apps/website/src/components/Nav/VizPopover.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const Links: { to: `/${string}`; children: ReactNode }[] = [
1212
{ to: '/viz/function-plot', children: 'FUNCTIONS' },
1313
{ to: '/viz/sine2', children: 'MORE SINE' },
1414
{ to: '/viz/tan', children: 'TAN' },
15+
{ to: '/viz/polar', children: 'POLAR' },
1516
];
1617

1718
interface VizPopoverProps {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { style } from '@vanilla-extract/css';
2+
3+
export const container = style({
4+
flex: 1,
5+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { useRef } from 'react';
2+
3+
import { ApplicationLayout } from '~/layouts/ApplicationLayout';
4+
5+
import * as styles from './Polar.css';
6+
7+
export function Polar(): JSX.Element {
8+
const containerRef = useRef<HTMLDivElement>(null);
9+
10+
return (
11+
<ApplicationLayout heading="Polar">
12+
<section ref={containerRef} className={styles.container}>
13+
<h1>Polar</h1>
14+
</section>
15+
</ApplicationLayout>
16+
);
17+
}
18+
19+
export default Polar;

apps/website/src/pages/Viz/Viz.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const FunctionPlot = lazy(() => import('~/components/FunctionPlot/FunctionPlot')
1010
const Sine2 = lazy(() => import('~/components/BigSine/Sine2'));
1111
const Tan = lazy(() => import('~/components/Tan/Tan'));
1212
const Sinusoidal = lazy(() => import('~/components/Sinusoidal/Sinusoidal'));
13+
const Polar = lazy(() => import('~/components/Polar/Polar'));
1314

1415
export function Viz(): JSX.Element {
1516
return (
@@ -55,6 +56,14 @@ export function Viz(): JSX.Element {
5556
</Suspense>
5657
}
5758
/>
59+
<Route
60+
path={Urls.Polar}
61+
element={
62+
<Suspense fallback={<Fallback />}>
63+
<Polar />
64+
</Suspense>
65+
}
66+
/>
5867
</Routes>
5968
</MathJaxProvider>
6069
);

apps/website/src/urls.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ export const FunctionPlot = '/function-plot';
1111
export const Sine2 = '/sine2';
1212
export const Tan = '/tan';
1313
export const Sinusoidal = '/sinusoidal';
14+
export const Polar = '/polar';

0 commit comments

Comments
 (0)