Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />

<title>NEAR</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4N8P08L7XC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-4N8P08L7XC');
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
Expand Down
61 changes: 35 additions & 26 deletions src/Components/NFT/Detail/details.module.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions src/Components/NFT/Detail/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useEffect } from "react";
import { BsArrowUpRight } from "react-icons/bs";
import { Accordion } from "react-bootstrap";
import { useSelector, useDispatch } from "react-redux";
import { useNavigate, useParams } from "react-router-dom";
import { toast } from "react-toastify";
import React, {useEffect} from "react";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set your IDE option of using space in Object literal braces & ES6 imports

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed. Do I need to re-run reformat code and push again?

import {BsArrowUpRight} from "react-icons/bs";
import {Accordion} from "react-bootstrap";
import {useSelector, useDispatch} from "react-redux";
import {useNavigate, useParams} from "react-router-dom";
import {toast} from "react-toastify";

import { mapNftDetails } from "../../../Utils/utils";
import {mapNftDetails} from "../../../Utils/utils";
import request from "../../../Services/httpClient";
import styles from "./details.module.css";

Expand All @@ -14,11 +14,11 @@ const Details = () => {
const navigate = useNavigate();
const nftIdFromUrl = useParams().nftId;

const { user } = useSelector((state) => state.authReducer);
const {user} = useSelector((state) => state.authReducer);
const nftData = useSelector((state) => state.nft__detail);

const sendNft = () => {
dispatch({ type: "sendnft__open" });
dispatch({type: "sendnft__open"});
dispatch({
type: "current_selected_nft",
payload: nftData,
Expand All @@ -39,10 +39,10 @@ const Details = () => {
async function getNftDetails() {
try {
const {
data: { data },
} = await request({ url: `/nfts/${nftIdFromUrl}` });
data: {data},
} = await request({url: `/nfts/${nftIdFromUrl}`});
if (data) {
dispatch({ type: "nft__detail", payload: mapNftDetails(data) });
dispatch({type: "nft__detail", payload: mapNftDetails(data)});
}
} catch (error) {
if (error.response.data) {
Expand Down Expand Up @@ -76,7 +76,7 @@ const Details = () => {
</div>
<div className={styles.details__info}>
<div className={styles.details__profile}>
<div className={styles.details__profile__picture}></div>
<div className={styles.details__profile__picture}/>
<div className={styles.details__user__info}>
<p>{nftData.owner}</p>
<h6>{user?.account_id}</h6>
Expand All @@ -87,7 +87,7 @@ const Details = () => {
<button onClick={() => sendNft()}>
Send{" "}
<span>
<BsArrowUpRight />
<BsArrowUpRight/>
</span>
</button>
)}
Expand Down