diff --git a/frontend/src/components/SessionDetail/SessionHeader.module.css b/frontend/src/components/SessionDetail/SessionHeader.module.css index 579d30d6a..e9763e998 100644 --- a/frontend/src/components/SessionDetail/SessionHeader.module.css +++ b/frontend/src/components/SessionDetail/SessionHeader.module.css @@ -19,8 +19,4 @@ justify-content: flex-start; gap: var(--cpd-space-2x); align-items: center; -} - -.back-icon { - } \ No newline at end of file diff --git a/frontend/src/components/SessionDetail/SessionHeader.tsx b/frontend/src/components/SessionDetail/SessionHeader.tsx index b78be8b0e..20e760094 100644 --- a/frontend/src/components/SessionDetail/SessionHeader.tsx +++ b/frontend/src/components/SessionDetail/SessionHeader.tsx @@ -12,23 +12,30 @@ // See the License for the specific language governing permissions and // limitations under the License. -import IconChevron from "@vector-im/compound-design-tokens/icons/chevron-left.svg"; -import { H3 } from "@vector-im/compound-web"; +import IconArrowLeft from "@vector-im/compound-design-tokens/icons/arrow-left.svg"; +import { H3, IconButton } from "@vector-im/compound-web"; import { PropsWithChildren } from "react"; -import Link from "../../routing/Link"; +import { useNavigationLink } from "../../routing"; +import LoadingSpinner from "../LoadingSpinner"; import styles from "./SessionHeader.module.css"; +const BackButton: React.FC = () => { + const { onClick, pending } = useNavigationLink({ + type: "sessions-overview", + }); + + return ( + + {pending ? : } + + ); +}; + const SessionHeader: React.FC = ({ children }) => (
- - - +

{children}

); diff --git a/frontend/src/components/SessionDetail/__snapshots__/CompatSessionDetail.test.tsx.snap b/frontend/src/components/SessionDetail/__snapshots__/CompatSessionDetail.test.tsx.snap index 28f898fde..5332b7a9a 100644 --- a/frontend/src/components/SessionDetail/__snapshots__/CompatSessionDetail.test.tsx.snap +++ b/frontend/src/components/SessionDetail/__snapshots__/CompatSessionDetail.test.tsx.snap @@ -8,25 +8,25 @@ exports[` > renders a compatability session details 1`] = `
- - +

@@ -164,25 +164,25 @@ exports[` > renders a compatability session without an ssoL
- - +

diff --git a/frontend/src/components/SessionDetail/__snapshots__/OAuth2SessionDetail.test.tsx.snap b/frontend/src/components/SessionDetail/__snapshots__/OAuth2SessionDetail.test.tsx.snap index 5b103c2b6..47fae3343 100644 --- a/frontend/src/components/SessionDetail/__snapshots__/OAuth2SessionDetail.test.tsx.snap +++ b/frontend/src/components/SessionDetail/__snapshots__/OAuth2SessionDetail.test.tsx.snap @@ -8,25 +8,25 @@ exports[` > renders session details 1`] = `
- - +