Commit 59e9af6f authored by Grant's avatar Grant
Browse files

Disable report button when logged out

parent c8276472
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ interface IInstance {
}

export const PixelWhoisSidebar = () => {
  const { pixelWhois, setPixelWhois } = useAppContext();
  const { pixelWhois, setPixelWhois, user } = useAppContext();
  const [loading, setLoading] = useState(true);
  const [whois, setWhois] = useState<{
    pixel: IPixel;
@@ -122,9 +122,15 @@ export const PixelWhoisSidebar = () => {
            </tr>
          </tbody>
        </table>
        {user ? (
          <Button color="danger" onPress={() => setReport(true)}>
            Report Pixel
          </Button>
        ) : (
          <Button color="danger" isDisabled variant="bordered">
            Report Pixel (logged out)
          </Button>
        )}
      </section>

      <ReportPixelModal