about summary refs log tree commit diff
path: root/assets/src/utils/getShareToken.ts
blob: b4706956850f78e3eae6855d9db868608e975a85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { isClientRequest } from "../stores/constant_state";

export default function (): string {
    if (!isClientRequest()) {
        throw new Error(
            "Client is not requesting so it does not have a share token."
        );
    }

    const splitPath = window.location.pathname.split("/");
    return splitPath[splitPath.length - 1];
}