Przeglądaj źródła

delete Username.jsx

jam411 3 lat temu
rodzic
commit
750dd0a0c4
1 zmienionych plików z 0 dodań i 28 usunięć
  1. 0 28
      packages/app/src/components/User/Username.jsx

+ 0 - 28
packages/app/src/components/User/Username.jsx

@@ -1,28 +0,0 @@
-import React from 'react';
-
-import Link from 'next/link';
-import PropTypes from 'prop-types';
-
-const Username = (props) => {
-  const { user } = props;
-
-  if (user == null) {
-    return <span>anyone</span>;
-  }
-
-  const name = user.name || '(no name)';
-  const username = user.username;
-  const href = `/user/${user.username}`;
-
-  return (
-    <Link href={href} prefetch={false}>
-      <a>{name} (@{username})</a>
-    </Link>
-  );
-};
-
-Username.propTypes = {
-  user: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), // Possibility of receiving a string of 'null'
-};
-
-export default Username;