Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amnak613 committed Dec 24, 2024
1 parent e817e92 commit 373634a
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions app/components/share.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

"use client";
import {
Text,
Expand All @@ -13,29 +12,20 @@ import FacebookIcon from "../img/icon-facebook.svg";
import EmailIcon from "../img/icon-email.svg";
import XIcon from "../img/icon-x.svg";
import LinkIcon from "../img/icon-link.svg";
import { useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import { useEffect, useState } from "react";
import { useRouter } from "next/router";
import { AddressData } from "./__mocks__/address-data";
import Link from "next/link";

const Share = () => {
const copyReportToClipBoard = () => {

// copy the current url to the clipboard
navigator.clipboard.writeText(currentUrl)

navigator.clipboard.writeText(currentUrl)
};

const [currentUrl, setCurrentUrl] = useState("");

useEffect(() => {

// want to create the url if address-1 is not in the url

// this will allow productionized app to work aswell if we do not change

// get the current url
if(window.location.href.includes('address-1')){

// address does not need to be formated
setCurrentUrl(window.location.href);
}
Expand Down

0 comments on commit 373634a

Please sign in to comment.