Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Navigation #904

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const config: StorybookConfig = {
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-a11y",
"@storybook/addon-designs"
"@storybook/addon-designs",
"storybook-addon-remix-react-router"
],
framework: {
name: "@storybook/react-webpack5",
Expand Down
5 changes: 3 additions & 2 deletions .storybook/preview-body.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@

window.insightsRefreshInterval;

window.notificationsRefreshInterval;
window.notificationsViewMode;
// deprecated
// window.notificationsRefreshInterval;
// window.notificationsViewMode;

window.recentActivityExpirationLimit;
window.recentActivityDocumentationURL =
Expand Down
6 changes: 4 additions & 2 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ import { StoryFn } from "@storybook/react";
// TODO: remove React import due to new JSX transform
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import React, { useEffect, useState } from "react";
import { withRouter } from "storybook-addon-remix-react-router";
import {
cancelMessage,
initializeDigmaMessageListener,
sendMessage
} from "../src/api";
import { App, THEMES } from "../src/components/common/App";
import { dispatcher } from "../src/dispatcher";
import { Mode } from "../src/globals";
import { Theme } from "../src/globals";

const preview: Preview = {
decorators: [
withRouter,
(Story: StoryFn, context): JSX.Element => {
const [isInitialized, setIsInitialized] = useState(false);
const theme = context.globals.theme as Mode;
const theme = context.globals.theme as Theme;

useEffect(() => {
const removeDigmaMessageListener =
Expand Down
Loading
Loading