2024-06-07 20:17:03 +03:00
|
|
|
import { urls } from '@/app/urls';
|
|
|
|
import { HelpTopic } from '@/models/miscellaneous';
|
|
|
|
|
|
|
|
import TextURL from './TextURL';
|
|
|
|
|
|
|
|
interface TextURLProps {
|
2024-10-31 15:21:21 +03:00
|
|
|
/** Text to display. */
|
2024-06-07 20:17:03 +03:00
|
|
|
text: string;
|
2024-10-31 15:21:21 +03:00
|
|
|
/** Topic to link to. */
|
2024-06-07 20:17:03 +03:00
|
|
|
topic: HelpTopic;
|
|
|
|
}
|
|
|
|
|
2024-10-31 15:21:21 +03:00
|
|
|
/**
|
|
|
|
* Displays a link to a help topic.
|
|
|
|
*/
|
2024-06-07 20:17:03 +03:00
|
|
|
function LinkTopic({ text, topic }: TextURLProps) {
|
|
|
|
return <TextURL text={text} href={urls.help_topic(topic)} />;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default LinkTopic;
|