openreplay/frontend/app/components/ui/Link/Link.js
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

23 lines
676 B
JavaScript

import React from 'react';
import { Link } from 'react-router-dom';
import { observer } from 'mobx-react-lite';
import { useStore } from 'App/mstore';
import cn from 'classnames';
import { withSiteId } from 'App/routes';
import styles from './link.module.css';
function OpenReplayLink({ siteId, to, className = '', dispatch, ...other }) {
const { projectsStore } = useStore();
const projectId = projectsStore.siteId;
return (
<Link
{...other}
className={cn(className, styles.link, 'px-2', 'hover:text-inherit')}
to={withSiteId(to, siteId ?? projectId)}
/>
);
}
OpenReplayLink.displayName = 'OpenReplayLink';
export default OpenReplayLink;