Skip to content

Commit

Permalink
tweak: Reorganize the detour panels into a folder
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahpurcell committed Oct 4, 2024
1 parent 2c26b55 commit 327d7f6
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { PropsWithChildren } from "react"
import { DetourDirection } from "../../models/detour"
import { DetourDirection } from "../../../models/detour"
import { Button, ListGroup } from "react-bootstrap"
import { Panel } from "./diversionPage"
import { Stop } from "../../schedule"
import { Panel } from "../diversionPage"
import { Stop } from "../../../schedule"
import {
ArrowLeft,
ExclamationTriangleFill,
StopCircle,
} from "../../helpers/bsIcons"
import { AffectedRoute, MissedStops } from "./detourPanelComponents"
} from "../../../helpers/bsIcons"
import { AffectedRoute, MissedStops } from "../detourPanelComponents"

export interface ActiveDetourPanelProps extends PropsWithChildren {
directions?: DetourDirection[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { PropsWithChildren } from "react"
import { Button, Form, OverlayTrigger, Popover } from "react-bootstrap"
import * as BsIcons from "../../helpers/bsIcons"
import { Panel } from "./diversionPage"
import * as BsIcons from "../../../helpers/bsIcons"
import { Panel } from "../diversionPage"

interface DetourFinishedPanelProps extends PropsWithChildren {
onNavigateBack: () => void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { useId } from "react"
import { Button, Form, Spinner } from "react-bootstrap"
import { Panel } from "./diversionPage"
import { Panel } from "../diversionPage"
import {
ByRoutePatternId,
Route,
RoutePattern,
RoutePatternId,
} from "../../schedule"
import RoutePropertiesCard from "../mapPage/routePropertiesCard"
} from "../../../schedule"
import RoutePropertiesCard from "../../mapPage/routePropertiesCard"

interface SelectedRouteInfoWithRoutePatterns {
selectedRoute: Route
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react"
import { DetourShape } from "../../models/detour"
import { DetourShape } from "../../../models/detour"
import { Button, ListGroup } from "react-bootstrap"
import { Panel } from "./diversionPage"
import { Stop } from "../../schedule"
import { ArrowLeft } from "../../helpers/bsIcons"
import { AffectedRoute, MissedStops } from "./detourPanelComponents"
import { Panel } from "../diversionPage"
import { Stop } from "../../../schedule"
import { ArrowLeft } from "../../../helpers/bsIcons"
import { AffectedRoute, MissedStops } from "../detourPanelComponents"

export interface DrawDetourPanelProps {
directions?: DetourShape["directions"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react"
import { Panel } from "./diversionPage"
import { DetourDirection } from "../../models/detour"
import { Stop } from "../../schedule"
import { ArrowLeft } from "../../helpers/bsIcons"
import { Panel } from "../diversionPage"
import { DetourDirection } from "../../../models/detour"
import { Stop } from "../../../schedule"
import { ArrowLeft } from "../../../helpers/bsIcons"
import { Button, ListGroup } from "react-bootstrap"
import { AffectedRoute, MissedStops } from "./detourPanelComponents"
import { AffectedRoute, MissedStops } from "../detourPanelComponents"

export interface PastDetourPanelProps {
directions?: DetourDirection[]
Expand Down
10 changes: 5 additions & 5 deletions assets/src/components/detours/diversionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ import React, {
useEffect,
useState,
} from "react"
import { DrawDetourPanel } from "./drawDetourPanel"
import { DrawDetourPanel } from "./detourPanels/drawDetourPanel"
import { DetourMap } from "./detourMap"
import { useDetour } from "../../hooks/useDetour"
import { Alert, CloseButton } from "react-bootstrap"
import * as BsIcons from "../../helpers/bsIcons"
import { OriginalRoute } from "../../models/detour"
import { joinClasses } from "../../helpers/dom"
import { AsProp } from "react-bootstrap/esm/helpers"
import { DetourFinishedPanel } from "./detourFinishedPanel"
import { DetourRouteSelectionPanel } from "./detourRouteSelectionPanel"
import { DetourFinishedPanel } from "./detourPanels/detourFinishedPanel"
import { DetourRouteSelectionPanel } from "./detourPanels/detourRouteSelectionPanel"
import { Route, RoutePattern } from "../../schedule"
import RoutesContext from "../../contexts/routesContext"
import { Snapshot } from "xstate"
import inTestGroup, { TestGroups } from "../../userInTestGroup"
import { ActiveDetourPanel } from "./activeDetourPanel"
import { PastDetourPanel } from "./pastDetourPanel"
import { ActiveDetourPanel } from "./detourPanels/activeDetourPanel"
import { PastDetourPanel } from "./detourPanels/pastDetourPanel"
import userInTestGroup from "../../userInTestGroup"
import { useCurrentTimeSeconds } from "../../hooks/useCurrentTime"
import { timeAgoLabel } from "../../util/dateTime"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from "@storybook/react"

import React from "react"
import { ActiveDetourPanel } from "../../../src/components/detours/activeDetourPanel"
import { ActiveDetourPanel } from "../../../src/components/detours/detourPanels/activeDetourPanel"
import { stopFactory } from "../../../tests/factories/stop"

const meta = {
Expand Down

0 comments on commit 327d7f6

Please sign in to comment.