mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
Run prettier on all files.
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
import { Link, LinkProps } from "react-router-dom";
|
||||
|
||||
type Props = LinkProps & JSX.HTMLAttributes<HTMLAnchorElement> & {
|
||||
active: boolean
|
||||
};
|
||||
type Props = LinkProps &
|
||||
JSX.HTMLAttributes<HTMLAnchorElement> & {
|
||||
active: boolean;
|
||||
};
|
||||
|
||||
export default function ConditionalLink(props: Props) {
|
||||
const { active, ...linkProps } = props;
|
||||
const { active, ...linkProps } = props;
|
||||
|
||||
if (active) {
|
||||
return <a>{ props.children }</a>;
|
||||
} else {
|
||||
return <Link {...linkProps} />;
|
||||
}
|
||||
if (active) {
|
||||
return <a>{props.children}</a>;
|
||||
} else {
|
||||
return <Link {...linkProps} />;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user