mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 09:45:37 -04:00
docs: consolidate docs (#2182)
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
8d46d7e39e
commit
ecffebc43c
307 changed files with 1474 additions and 487 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -7,6 +7,13 @@
|
|||
import { useRouter } from 'next/router'
|
||||
import { useMemo } from 'react'
|
||||
|
||||
/**
|
||||
* Extracts the parameter from the router expected to be a single value.
|
||||
*
|
||||
* @param parameter The parameter to extract
|
||||
* @param fallback The fallback returned if there is no value.
|
||||
* @return A value extracted from the router.
|
||||
*/
|
||||
export const useSingleStringUrlParameter = <T>(parameter: string, fallback: T): string | T => {
|
||||
const router = useRouter()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue